summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lua-interface.cpp43
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
}