-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Memory dev: changed args or LuaMemory::LuaMemory and LuaMemory::memorize() #199
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: shewer <shewer@gmail.com>
Signed-off-by: shewer <shewer@gmail.com>
Signed-off-by: shewer <shewer@gmail.com>
Signed-off-by: shewer <shewer@gmail.com>
Signed-off-by: shewer <shewer@gmail.com>
Signed-off-by: shewer <shewer@gmail.com>
Signed-off-by: shewer <shewer@gmail.com>
Signed-off-by: shewer <shewer@gmail.com>
Signed-off-by: shewer <shewer@gmail.com>
Signed-off-by: shewer <shewer@gmail.com>
* add EngineReg select_schema() env.engine:select( string schema_id ) .next Signed-off-by: shewer <shewer@gmail.com> * add engine:apply_schema( Schema &) Schema( const string &) Signed-off-by: shewer <shewer@gmail.com>
Signed-off-by: shewer <shewer@gmail.com>
Signed-off-by: shewer <shewer@gmail.com>
Signed-off-by: Shewer Lu <shewer@gmail.com>
Signed-off-by: Shewer Lu <shewer@gmail.com>
Signed-off-by: Shewer Lu <shewer@gmail.com>
Signed-off-by: Shewer Lu <shewer@gmail.com>
Signed-off-by: Shewer Lu <shewer@gmail.com>
不赞同。这样又改变接口了,也没有明显的好处。 |
|
是的,就是这里要改变。另外 callback 不一定需要 |
LuaMemory callback_commit ,我的理解 是 commit 時處理 commitEntry to userdb callback 是外部function 須要 將 memory 自身 及 commitEntrys 傳遞 給callback callback 是 LuaMemoryze::Memorize() Memory::OnCommit(ctx) 取出commit candidate 轉置 commitentrys 要如何自定引數? local function gen_callback( args)
return function(mem,commit)
... ...
end
end
env.mem:memorize( gen_callback( args) ) env.mem:memorize( wrap_func( ...) .... return function(mem,commit) .... end end) https://github.com/rime/librime/blob/f931b5bba731a1543634023f688563e546cd5107/src/rime/gear/memory.h#L40 |
issue : MemoryReg 異動