diff options
| author | ruki <[email protected]> | 2022-07-23 00:43:11 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-07-23 00:43:11 +0800 |
| commit | 2882d942dd406f1443bf171424f06513c6f7d4e5 (patch) | |
| tree | ea03b37fe5b88444adaddabd51d3e80d78dfc340 /core/src/xmake/engine.c | |
| parent | 08f1f473ba31ac3720c3ecf3cc5afac04947eab6 (diff) | |
add fwatcher open/close
Diffstat (limited to 'core/src/xmake/engine.c')
| -rw-r--r-- | core/src/xmake/engine.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/core/src/xmake/engine.c b/core/src/xmake/engine.c index d275c21f8..9bd925a03 100644 --- a/core/src/xmake/engine.c +++ b/core/src/xmake/engine.c @@ -245,6 +245,10 @@ tb_int_t xm_process_wait(lua_State* lua); tb_int_t xm_process_kill(lua_State* lua); tb_int_t xm_process_close(lua_State* lua); +// the fwatcher functions +tb_int_t xm_fwatcher_open(lua_State* lua); +tb_int_t xm_fwatcher_close(lua_State* lua); + // the sandbox functions tb_int_t xm_sandbox_interactive(lua_State* lua); @@ -488,6 +492,14 @@ static luaL_Reg const g_process_functions[] = , { tb_null, tb_null } }; +// the fwatcher functions +static luaL_Reg const g_fwatcher_functions[] = +{ + { "open", xm_fwatcher_open } +, { "close", xm_fwatcher_close } +, { tb_null, tb_null } +}; + // the sandbox functions static luaL_Reg const g_sandbox_functions[] = { @@ -1025,6 +1037,9 @@ xm_engine_ref_t xm_engine_init(tb_char_t const* name, xm_engine_lni_initalizer_c // bind process functions xm_lua_register(engine->lua, "process", g_process_functions); + // bind fwatcher functions + xm_lua_register(engine->lua, "fwatcher", g_fwatcher_functions); + // bind sandbox functions xm_lua_register(engine->lua, "sandbox", g_sandbox_functions); |
