Skip to content

add options and properties - #357

Open
shewer wants to merge 7 commits into
hchunhui:masterfrom
shewer:patch-27
Open

shewer wants to merge 7 commits into
hchunhui:masterfrom
shewer:patch-27

Conversation

@shewer

@shewer shewer commented Jul 4, 2024

Copy link
Copy Markdown
Contributor

新增訪問 options , properties api
rime/librime@a4f24fd

-- 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]) 

Signed-off-by: shewer <shewer@gmail.com>
@hchunhui

Copy link
Copy Markdown
Owner

直接 wrap map & 较优。这样就不必中转 table

@shewer

shewer commented Aug 21, 2024

Copy link
Copy Markdown
Contributor Author

試過在 lua_templte.h 加上 map , 但是失敗了

@shewer

shewer commented Jan 28, 2025

Copy link
Copy Markdown
Contributor Author

直接 wrap map & 较优。这样就不必中转 table

己修正 lua_template.h 可以return table 了
移除 set_options set_properties

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants