summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpixel <pixel>2008-08-04 09:38:55 +0000
committerpixel <pixel>2008-08-04 09:38:55 +0000
commit6106ce4290152d0bf588bc97c0ef625f0a3006db (patch)
tree61ff65d6e79a94cf32ddaec65a8a8f20f2ffab7a
parent1ee5adc42dbf6dafd1a16933b4cd1e3b8667f265 (diff)
Adding built-in debugging system.
-rw-r--r--src/plugin-luaconfigfiles.cc12
-rw-r--r--src/plugin-luaftgl.cc12
-rw-r--r--src/plugin-luagl.cc14
-rw-r--r--src/plugin-luahandle.cc14
-rw-r--r--src/plugin-luahttp.cc12
-rw-r--r--src/plugin-lualibs.cc12
-rw-r--r--src/plugin-luaocci.cc12
-rw-r--r--src/plugin-luaregex.cc12
-rw-r--r--src/plugin-luasql.cc12
-rw-r--r--src/plugin-luatask.cc12
-rw-r--r--src/plugin-luaxml.cc14
11 files changed, 113 insertions, 25 deletions
diff --git a/src/plugin-luaconfigfiles.cc b/src/plugin-luaconfigfiles.cc
index a174f6a..9df08ab 100644
--- a/src/plugin-luaconfigfiles.cc
+++ b/src/plugin-luaconfigfiles.cc
@@ -1,9 +1,17 @@
#include <LuaConfigFile.h>
+static void _init_plugin(Lua * L) {
+ LuaConfigFile::pushstatics(L);
+}
+
extern "C" {
-void init_plugin(Lua * L) {
- LuaConfigFile::pushstatics(L);
+__attribute__ ((weak)) void init_plugin(Lua * L) {
+ _init_plugin(L);
+}
+
+void luaconfigfiles_init(Lua * L) {
+ _init_plugin(L);
}
}
diff --git a/src/plugin-luaftgl.cc b/src/plugin-luaftgl.cc
index cd577b6..6cb0f0a 100644
--- a/src/plugin-luaftgl.cc
+++ b/src/plugin-luaftgl.cc
@@ -1,9 +1,17 @@
#include <LuaFTGL.h>
+static void _init_plugin(Lua * L) {
+ LuaFTFont::pushstatics(L);
+}
+
extern "C" {
-void init_plugin(Lua * L) {
- LuaFTFont::pushstatics(L);
+__attribute__ ((weak)) void init_plugin(Lua * L) {
+ _init_plugin(L);
+}
+
+void luaftgl_init(Lua * L) {
+ _init_plugin(L);
}
}
diff --git a/src/plugin-luagl.cc b/src/plugin-luagl.cc
index 2f0b55c..34bdc2d 100644
--- a/src/plugin-luagl.cc
+++ b/src/plugin-luagl.cc
@@ -1,10 +1,18 @@
#include <LuaGL.h>
-extern "C" {
-
-void init_plugin(Lua * L) {
+static void _init_plugin(Lua * L) {
luaopen_opengl(L);
L->pop();
}
+
+extern "C" {
+
+__attribute__ ((weak)) void init_plugin(Lua * L) {
+ _init_plugin(L);
+}
+
+void luagl_init(Lua * L) {
+ _init_plugin(L);
+}
}
diff --git a/src/plugin-luahandle.cc b/src/plugin-luahandle.cc
index d2002af..a1cf4ea 100644
--- a/src/plugin-luahandle.cc
+++ b/src/plugin-luahandle.cc
@@ -1,12 +1,20 @@
#include <LuaHandle.h>
-extern "C" {
-
-void init_plugin(Lua * L) {
+static void _init_plugin(Lua * L) {
LuaInput::pushconstruct(L);
LuaOutput::pushconstruct(L);
LuaBuffer::pushconstruct(L);
LuaHandle::pushconstruct(L);
}
+extern "C" {
+
+__attribute__ ((weak)) void init_plugin(Lua * L) {
+ _init_plugin(L);
+}
+
+void luahandle_init(Lua * L) {
+ _init_plugin(L);
+}
+
}
diff --git a/src/plugin-luahttp.cc b/src/plugin-luahttp.cc
index 819a2f3..ae7ee34 100644
--- a/src/plugin-luahttp.cc
+++ b/src/plugin-luahttp.cc
@@ -1,9 +1,17 @@
#include <LuaHttp.h>
+static void _init_plugin(Lua * L) {
+ LuaHttpResponse::pushstatics(L);
+}
+
extern "C" {
-void init_plugin(Lua * L) {
- LuaHttpResponse::pushstatics(L);
+__attribute__ ((weak)) void init_plugin(Lua * L) {
+ _init_plugin(L);
+}
+
+void luahttp_init(Lua * L) {
+ _init_plugin(L);
}
}
diff --git a/src/plugin-lualibs.cc b/src/plugin-lualibs.cc
index e364d9b..8233f7d 100644
--- a/src/plugin-lualibs.cc
+++ b/src/plugin-lualibs.cc
@@ -1,9 +1,17 @@
#include <loadlualibs.h>
+static void _init_plugin(Lua * L) {
+ LoadLuaLibs(L);
+}
+
extern "C" {
-void init_plugin(Lua * L) {
- LoadLuaLibs(L);
+__attribute__ ((weak)) void init_plugin(Lua * L) {
+ _init_plugin(L);
+}
+
+void lualibs_init(Lua * L) {
+ _init_plugin(L);
}
}
diff --git a/src/plugin-luaocci.cc b/src/plugin-luaocci.cc
index 8d9377e..841c6be 100644
--- a/src/plugin-luaocci.cc
+++ b/src/plugin-luaocci.cc
@@ -1,9 +1,17 @@
#include <LuaOCCI.h>
+static void _init_plugin(Lua * L) {
+ LuaOCCI_pushstatics(L);
+}
+
extern "C" {
-void init_plugin(Lua * L) {
- LuaOCCI_pushstatics(L);
+__attribute__ ((weak)) void init_plugin(Lua * L) {
+ _init_plugin(L);
+}
+
+void luaocci_init(Lua * L) {
+ _init_plugin(L);
}
}
diff --git a/src/plugin-luaregex.cc b/src/plugin-luaregex.cc
index 694738c..5f3a59e 100644
--- a/src/plugin-luaregex.cc
+++ b/src/plugin-luaregex.cc
@@ -1,9 +1,17 @@
#include <LuaRegex.h>
+static void _init_plugin(Lua * L) {
+ LuaRegex::pushstatics(L);
+}
+
extern "C" {
-void init_plugin(Lua * L) {
- LuaRegex::pushstatics(L);
+__attribute__ ((weak)) void init_plugin(Lua * L) {
+ _init_plugin(L);
+}
+
+void luaregex_init(Lua * L) {
+ _init_plugin(L);
}
}
diff --git a/src/plugin-luasql.cc b/src/plugin-luasql.cc
index c891942..4f94d78 100644
--- a/src/plugin-luasql.cc
+++ b/src/plugin-luasql.cc
@@ -1,9 +1,17 @@
#include <LuaSQL.h>
+static void _init_plugin(Lua * L) {
+ LuaSQLConnection::pushstatics(L);
+}
+
extern "C" {
-void init_plugin(Lua * L) {
- LuaSQLConnection::pushstatics(L);
+__attribute__ ((weak)) void init_plugin(Lua * L) {
+ _init_plugin(L);
+}
+
+void luasql_init(Lua * L) {
+ _init_plugin(L);
}
}
diff --git a/src/plugin-luatask.cc b/src/plugin-luatask.cc
index b97e273..dce08f0 100644
--- a/src/plugin-luatask.cc
+++ b/src/plugin-luatask.cc
@@ -1,9 +1,17 @@
#include <LuaTask.h>
+static void _init_plugin(Lua * L) {
+ LuaTaskMan::pushstatics(L);
+}
+
extern "C" {
-void init_plugin(Lua * L) {
- LuaTaskMan::pushstatics(L);
+__attribute__ ((weak)) void init_plugin(Lua * L) {
+ _init_plugin(L);
+}
+
+void luatask_init(Lua * L) {
+ _init_plugin(L);
}
}
diff --git a/src/plugin-luaxml.cc b/src/plugin-luaxml.cc
index 2cec871..0e3ad06 100644
--- a/src/plugin-luaxml.cc
+++ b/src/plugin-luaxml.cc
@@ -1,10 +1,18 @@
#include <LuaXML.h>
-extern "C" {
-
-void init_plugin(Lua * L) {
+static void _init_plugin(Lua * L) {
luaopen_xml(L);
L->pop();
}
+extern "C" {
+
+__attribute__ ((weak)) void init_plugin(Lua * L) {
+ _init_plugin(L);
+}
+
+void luaxml_init(Lua * L) {
+ _init_plugin(L);
+}
+
}