From 6f85bc57d5e91adde1335652cc9aa0b32d60191c Mon Sep 17 00:00:00 2001 From: Pixel Date: Mon, 23 Mar 2009 11:08:05 -0700 Subject: Fixing externals for the dll versions. --- src/plugin-luapsx.cc | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'src/plugin-luapsx.cc') 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 #include -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); +} + } -- cgit v1.2.3