diff options
Diffstat (limited to 'tests/projects')
| -rw-r--r-- | tests/projects/xmake_cli/hello/src/lni/main.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/projects/xmake_cli/hello/src/lni/main.c b/tests/projects/xmake_cli/hello/src/lni/main.c index d61d60dac..740857750 100644 --- a/tests/projects/xmake_cli/hello/src/lni/main.c +++ b/tests/projects/xmake_cli/hello/src/lni/main.c @@ -1,8 +1,7 @@ #include <xmake/xmake.h> -static tb_byte_t const g_luafiles_data[] = { - #include "luafiles.xmz.h" -}; +extern tb_byte_t const _binary_luafiles_xmz_start[]; +extern tb_byte_t const _binary_luafiles_xmz_end[]; static tb_int_t lni_test_hello(lua_State* lua) { lua_pushliteral(lua, "hello xmake!"); @@ -15,7 +14,8 @@ static tb_void_t lni_initalizer(xm_engine_ref_t engine, lua_State* lua) { , {tb_null, tb_null} }; xm_engine_register(engine, "test", lni_test_funcs); - xm_engine_add_embedfiles(engine, g_luafiles_data, sizeof(g_luafiles_data)); + xm_engine_add_embedfiles(engine, _binary_luafiles_xmz_start, + (tb_size_t)(_binary_luafiles_xmz_end - _binary_luafiles_xmz_start)); } tb_int_t main(tb_int_t argc, tb_char_t** argv) { |
