From 43229d766f1e0f3198f61dc9d2e38bc1f921387f Mon Sep 17 00:00:00 2001 From: Shewer Lu Date: Fri, 3 May 2024 21:07:09 +0800 Subject: [PATCH] add MemoryReg (start_session() finish_session() discard_session() for user_dict update (#333) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在 OnCommit() 線外操作 user_dict 須要 呼叫 start_session() finish_session() --- src/types.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/types.cc b/src/types.cc index db316f0..1450065 100644 --- a/src/types.cc +++ b/src/types.cc @@ -1956,6 +1956,9 @@ namespace MemoryReg { }; static const luaL_Reg methods[] = { + {"start_session", WRAPMEM(T, StartSession)}, + {"finish_session", WRAPMEM(T, FinishSession)}, + {"discard_session", WRAPMEM(T, DiscardSession)}, { "dict_lookup", WRAPMEM(T::dictLookup)}, // bool { "user_lookup", WRAPMEM(T::userLookup)}, // bool { "dictiter_lookup", WRAPMEM(T::dictiterLookup)}, // iter