Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add options and properties #357

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

add options and properties #357

wants to merge 5 commits into from

Conversation

shewer
Copy link
Contributor

@shewer shewer commented Jul 4, 2024

新增訪問 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]) 

@hchunhui
Copy link
Owner

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

@shewer
Copy link
Contributor Author

shewer commented Aug 21, 2024

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

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