summaryrefslogtreecommitdiff
path: root/src/lua-interface.cpp
diff options
context:
space:
mode:
authorpixel <pixel>2008-08-04 09:36:35 +0000
committerpixel <pixel>2008-08-04 09:36:35 +0000
commit88aa1ca175c3f9c73ab2d0fd7f1636f87c1f8167 (patch)
tree45f999eca7e277693c9ca91e5f8d8797abc00848 /src/lua-interface.cpp
parent0ca7e7e67883af752430f5095d262424f71619d5 (diff)
Adding built-in debugging system.
Diffstat (limited to 'src/lua-interface.cpp')
-rw-r--r--src/lua-interface.cpp46
1 files changed, 44 insertions, 2 deletions
diff --git a/src/lua-interface.cpp b/src/lua-interface.cpp
index 9da24d9..6a773f1 100644
--- a/src/lua-interface.cpp
+++ b/src/lua-interface.cpp
@@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* $Id: lua-interface.cpp,v 1.5 2008-07-16 09:38:03 pixel Exp $ */
+/* $Id: lua-interface.cpp,v 1.6 2008-08-04 09:36:35 pixel Exp $ */
#define WIP
@@ -48,6 +48,19 @@
#include "lua-interface-hc.h"
+extern void static_mode (void) __attribute__ ((weak));
+extern void luaconfigfiles_init(Lua * L) __attribute__ ((weak));
+extern void luaftgl_init(Lua * L) __attribute__ ((weak));
+extern void luagl_init(Lua * L) __attribute__ ((weak));
+extern void luahandle_init(Lua * L) __attribute__ ((weak));
+extern void luahttp_init(Lua * L) __attribute__ ((weak));
+extern void lualibs_init(Lua * L) __attribute__ ((weak));
+extern void luaocci_init(Lua * L) __attribute__ ((weak));
+extern void luaregex_init(Lua * L) __attribute__ ((weak));
+extern void luasql_init(Lua * L) __attribute__ ((weak));
+extern void luatask_init(Lua * L) __attribute__ ((weak));
+extern void luaxml_init(Lua * L) __attribute__ ((weak));
+
#ifdef _WIN32
#include <windows.h>
@@ -279,7 +292,36 @@ int sLua_baselua_interface::baselua_interface_proceed_statics(Lua * L, int n, in
}
break;
case BASELUA_INTERFACE_LOADMODULE:
- LuaLoadPlugin(L->tostring(1), L);
+ filename = L->tostring();
+ if (static_mode) {
+ if (filename == "luaconfigfiles") {
+ luaconfigfiles_init(L);
+ } else if (filename == "luaftgl") {
+ luaftgl_init(L);
+ } else if (filename == "luagl") {
+ luagl_init(L);
+ } else if (filename == "luahandle") {
+ luahandle_init(L);
+ } else if (filename == "luahttp") {
+ luahttp_init(L);
+ } else if (filename == "lualibs") {
+ lualibs_init(L);
+ } else if (filename == "luaocci") {
+ luaocci_init(L);
+ } else if (filename == "luaregex") {
+ luaregex_init(L);
+ } else if (filename == "luasql") {
+ luasql_init(L);
+ } else if (filename == "luatask") {
+ luatask_init(L);
+ } else if (filename == "luaxml") {
+ luaxml_init(L);
+ } else {
+ L->error("lua-interface in static mode, and module unknown.");
+ }
+ } else {
+ LuaLoadPlugin(L->tostring(1), L);
+ }
break;
case BASELUA_INTERFACE_UNLINK:
filename = L->tostring(1);