From 89e7a9ecfad9a54633eb3ebbab1d1f13ad78826f Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 6 Aug 2018 16:22:00 +0800 Subject: *update --- src/lua/embed/embed.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/lua/embed') diff --git a/src/lua/embed/embed.h b/src/lua/embed/embed.h index 2ef8b75..33620b0 100644 --- a/src/lua/embed/embed.h +++ b/src/lua/embed/embed.h @@ -10,8 +10,8 @@ namespace embed /** * embed lua script to context. */ -#define embed(L, script, name) \ - if(luaL_loadbuffer(L, script, strlen(script), name) == 0)\ +#define embed(L, script, name)\ + if(luax_loadbuffer(L, script, strlen(script), name) == 0)\ lua_call(L, 0, 0); /** @@ -33,14 +33,14 @@ namespace embed // embed scripts const jin_Embed scripts[] = { - {"graphics.lua", graphics_lua}, - {"keyboard.lua", keyboard_lua}, - {"mouse.lua", mouse_lua}, - {"debug.lua", debug_lua}, - {"boot.lua", boot_lua}, - {0, 0} + { "graphics.lua", graphics_lua }, + { "keyboard.lua", keyboard_lua }, + { "mouse.lua", mouse_lua }, + { "debug.lua", debug_lua }, + { "boot.lua", boot_lua }, + { 0, 0 } }; - + // load all emebd lua scripts for (int i = 0; scripts[i].fname; ++i) embed(L, scripts[i].source, scripts[i].fname); -- cgit v1.1-26-g67d0