librime-lua
librime-lua copied to clipboard
add options and properties
新增訪問 options , properties api https://github.com/rime/librime/commit/a4f24fd705e78ccaf7d1fa65f36c31341ecab180
-- vars_get & vars_set
context.options = { a=true, b=true}
context.properties = {a='a', b='b' }
local tab = context:get_options() -- key: string value: bool
local tab = context:get_properties() -- key: string value: string
context:set_options(table [,force_write: bool])
context:set_properties(table [,force_write: bool])
直接 wrap map & 较优。这样就不必中转 table
試過在 lua_templte.h 加上 map , 但是失敗了
直接 wrap
map &较优。这样就不必中转 table
己修正 lua_template.h 可以return table 了 移除 set_options set_properties