summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/plugin-luacd.cc18
-rw-r--r--src/plugin-luapsx.cc13
2 files changed, 31 insertions, 0 deletions
diff --git a/src/plugin-luacd.cc b/src/plugin-luacd.cc
new file mode 100644
index 0000000..5b10abc
--- /dev/null
+++ b/src/plugin-luacd.cc
@@ -0,0 +1,18 @@
+#include <BLua.h>
+#include <luacd.h>
+
+static void _init_plugin(Lua * L) {
+ static bool done = false;
+ if (done) return;
+ done = true;
+ CD_PUSHSTATICS(L);
+}
+
+
+extern "C" {
+
+void luacd_init(Lua * L) {
+ _init_plugin(L);
+}
+
+}
diff --git a/src/plugin-luapsx.cc b/src/plugin-luapsx.cc
new file mode 100644
index 0000000..e1f820c
--- /dev/null
+++ b/src/plugin-luapsx.cc
@@ -0,0 +1,13 @@
+#include <BLua.h>
+#include <luapsx.h>
+
+extern "C" {
+
+void init_plugin(Lua * L) {
+ static bool done = false;
+ if (done) return;
+ done = true;
+ Luapsx::pushstatics(L);
+}
+
+}