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

Raw init #261

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

Raw init #261

wants to merge 41 commits into from

Conversation

shewer
Copy link
Contributor

@shewer shewer commented Aug 9, 2023

調整 init 流程
0 建立 註冊 struct array ; init fini_ func ....
1 建立 env_
2 載入模組 (lua table) ,將function 轉成 table {func=function}
3 設置 member fin_ func_ .... , 從 table[key] 中取an LuaObj
4 VOID_CALL 執行 init (env)

static void raw_init(lua_State *L, const Ticket &t,
                     an<LuaObj> *env, InitTab *luaobjs, size_t size) {
  raw_init_env(L, t, env);//(-0, +0, +m) update env
  raw_load_module(L, t);//(-0, +1)  table
  reg_funcs(L, -1, luaobjs, size);//(-0,+0,+m)  luaobjs
  lua_pop(L, 1); // remove module table
}

shewer added 30 commits March 30, 2021 20:03
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>
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.

1 participant