summaryrefslogtreecommitdiff
path: root/src/plugin-luasql.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugin-luasql.cc')
-rw-r--r--src/plugin-luasql.cc12
1 files changed, 10 insertions, 2 deletions
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);
}
}