diff options
Diffstat (limited to 'src/lua/jin.cpp')
-rw-r--r-- | src/lua/jin.cpp | 47 |
1 files changed, 24 insertions, 23 deletions
diff --git a/src/lua/jin.cpp b/src/lua/jin.cpp index faae9b2..10b60b6 100644 --- a/src/lua/jin.cpp +++ b/src/lua/jin.cpp @@ -1,39 +1,40 @@ -#include "jin.h" +#include "lua/common/je_lua_common.h" #include "lua/modules/luax.h" #include "embed/embed.h" +#include "jin.h" namespace JinEngine { namespace Lua { - extern int luaopen_core(lua_State* L); - extern int luaopen_graphics(lua_State* L); - extern int luaopen_audio(lua_State* L); - extern int luaopen_net(lua_State* L); - extern int luaopen_event(lua_State* L); - extern int luaopen_time(lua_State* L); - extern int luaopen_mouse(lua_State* L); - extern int luaopen_keyboard(lua_State* L); - extern int luaopen_filesystem(lua_State* L); - extern int luaopen_joypad(lua_State* L); - extern int luaopen_math(lua_State* L); - extern int luaopen_thread(lua_State* L); - extern int luaopen_bit(lua_State* L); + LUA_PORT int luaopen_core(lua_State* L); + LUA_PORT int luaopen_graphics(lua_State* L); + LUA_PORT int luaopen_audio(lua_State* L); + LUA_PORT int luaopen_net(lua_State* L); + LUA_PORT int luaopen_event(lua_State* L); + LUA_PORT int luaopen_time(lua_State* L); + LUA_PORT int luaopen_mouse(lua_State* L); + LUA_PORT int luaopen_keyboard(lua_State* L); + LUA_PORT int luaopen_filesystem(lua_State* L); + LUA_PORT int luaopen_joypad(lua_State* L); + LUA_PORT int luaopen_math(lua_State* L); + LUA_PORT int luaopen_thread(lua_State* L); + LUA_PORT int luaopen_bit(lua_State* L); - static int l_getversion(lua_State* L) + LUA_IMPLEMENT int l_getversion(lua_State* L) { luax_pushstring(L, VERSION); return 1; } - static int l_getAuthor(lua_State* L) + LUA_IMPLEMENT int l_getAuthor(lua_State* L) { luax_pushstring(L, AUTHOR); return 1; } - static int l_getOS(lua_State* L) + LUA_IMPLEMENT int l_getOS(lua_State* L) { #ifdef _WIN32 luax_pushstring(L, "windows"); @@ -45,26 +46,26 @@ namespace JinEngine return 1; } - static int l_revision(lua_State* L) + LUA_IMPLEMENT int l_revision(lua_State* L) { luax_pushnumber(L, REVISION); return 1; } - static const luax_Str s[] = { + LUA_IMPLEMENT const luax_Str s[] = { { "version", VERSION }, { "author", AUTHOR }, { "codename", CODE_NAME }, { 0, 0 } }; - static const luax_Num n[] = { + LUA_IMPLEMENT const luax_Num n[] = { { "revision", REVISION }, { 0, 0 } }; /* sub modules */ - static const luax_Ref mods[] = { + LUA_IMPLEMENT const luax_Ref mods[] = { { "core", luaopen_core }, { "event", luaopen_event }, { "graphics", luaopen_graphics }, @@ -83,7 +84,7 @@ namespace JinEngine }; /* register jin module, keep it on the top of stack */ - int luaopen_jin(lua_State* L) + LUA_EXPORT int luaopen_jin(lua_State* L) { luax_globaltable(L, MODULE_NAME); @@ -101,7 +102,7 @@ namespace JinEngine return 1; } - void boot(lua_State* L) + LUA_EXPORT void boot(lua_State* L) { JinEngine::embed::boot(L); } |