summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPixel <pixel@nobis-crew.org>2009-03-23 11:08:05 -0700
committerPixel <pixel@nobis-crew.org>2009-03-23 11:08:05 -0700
commit6f85bc57d5e91adde1335652cc9aa0b32d60191c (patch)
treef25dc9260ace0818d5e997090b1d1ab28688851a
parent76fbf91c022c08ca513789ae052bbcb24c4f4cc5 (diff)
Fixing externals for the dll versions.
-rw-r--r--src/plugin-luacd.cc10
-rw-r--r--src/plugin-luapsx.cc18
2 files changed, 26 insertions, 2 deletions
diff --git a/src/plugin-luacd.cc b/src/plugin-luacd.cc
index 5b10abc..f418f26 100644
--- a/src/plugin-luacd.cc
+++ b/src/plugin-luacd.cc
@@ -1,6 +1,12 @@
#include <BLua.h>
#include <luacd.h>
+#ifndef WIN32
+#define WEAK __attribute__ ((weak))
+#else
+#define WEAK
+#endif
+
static void _init_plugin(Lua * L) {
static bool done = false;
if (done) return;
@@ -11,6 +17,10 @@ static void _init_plugin(Lua * L) {
extern "C" {
+WEAK void init_plugin(Lua * L) {
+ _init_plugin(L);
+}
+
void luacd_init(Lua * L) {
_init_plugin(L);
}
diff --git a/src/plugin-luapsx.cc b/src/plugin-luapsx.cc
index e1f820c..e8c7713 100644
--- a/src/plugin-luapsx.cc
+++ b/src/plugin-luapsx.cc
@@ -1,13 +1,27 @@
#include <BLua.h>
#include <luapsx.h>
-extern "C" {
+#ifndef WIN32
+#define WEAK __attribute__ ((weak))
+#else
+#define WEAK
+#endif
-void init_plugin(Lua * L) {
+static void _init_plugin(Lua * L) {
static bool done = false;
if (done) return;
done = true;
Luapsx::pushstatics(L);
}
+extern "C" {
+
+WEAK void init_plugin(Lua * L) {
+ _init_plugin(L);
+}
+
+void luapsx_init(Lua * L) {
+ _init_plugin(L);
+}
+
}