Skip to content

Raw init#261

Open
shewer wants to merge 41 commits into
hchunhui:masterfrom
shewer:raw_init
Open

Raw init#261
shewer wants to merge 41 commits into
hchunhui:masterfrom
shewer:raw_init

Conversation

@shewer

@shewer shewer commented Aug 9, 2023

Copy link
Copy Markdown
Contributor

調整 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