diff options
author | Pixel <pixel@nobis-crew.org> | 2008-10-01 09:21:32 -0700 |
---|---|---|
committer | Pixel <pixel@nobis-crew.org> | 2008-10-01 09:21:32 -0700 |
commit | baf407cbee8cab72ff697cee409c25d27d39e37b (patch) | |
tree | 746a166811d9dd201dc563604905bda3dfdb8cc9 /src/lua-interface.cpp | |
parent | 0acd2529f18b41a6e339a6372033bc6a11b24fc8 (diff) |
Adding auto-load of the exports, when we have built-in modules.
Diffstat (limited to 'src/lua-interface.cpp')
-rw-r--r-- | src/lua-interface.cpp | 43 |
1 files changed, 26 insertions, 17 deletions
diff --git a/src/lua-interface.cpp b/src/lua-interface.cpp index 9474040..dccf0d8 100644 --- a/src/lua-interface.cpp +++ b/src/lua-interface.cpp @@ -517,6 +517,7 @@ Lua * start_full_lua(void) { Lua * L = start_basic_lua(); Lualua_interface::pushstatics(L); + autoload_exports(L); return L; } @@ -674,24 +675,32 @@ static void * interactive_prompt(void * __L) { return NULL; } -void check_exports(void) { - printm(M_INFO, "luaconfigfiles = %p\n", luaconfigfiles_init); +void autoload_exports(Lua * L) { + if (lualibs_init) + lualibs_init(L); + if (luahandle_init) + luahandle_init(L); + if (luaconfigfiles_init) + luaconfigfiles_init(L); + if (luahttp_init) + luahttp_init(L); + if (luaregex_init) + luaregex_init(L); + if (luasql_init) + luasql_init(L); + if (luatask_init) + luatask_init(L); + if (luaxml_init) + luaxml_init(L); #ifndef _MSVC - printm(M_INFO, "luaftgl = %p\n", luaftgl_init); - printm(M_INFO, "luagl = %p\n", luagl_init); -#endif - printm(M_INFO, "luahandle = %p\n", luahandle_init); - printm(M_INFO, "luahttp = %p\n", luahttp_init); - printm(M_INFO, "lualibs = %p\n", lualibs_init); -#ifndef _MSVC - printm(M_INFO, "luaocci = %p\n", luaocci_init); -#endif - printm(M_INFO, "luaregex = %p\n", luaregex_init); - printm(M_INFO, "luasql = %p\n", luasql_init); - printm(M_INFO, "luatask = %p\n", luatask_init); - printm(M_INFO, "luaxml = %p\n", luaxml_init); -#ifndef _MSVC - printm(M_INFO, "luaosmesa = %p\n", luaosmesa_init); + if (luaftgl_init) + luaftgl_init(L); + if (luagl_init) + luagl_init(L); + if (luaosmesa_init) + luaosmesa_init(L); + if (luaocci_init) + luaocci_init(L); #endif } |