summaryrefslogtreecommitdiff
path: root/scripting/test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scripting/test.cpp')
-rw-r--r--scripting/test.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/scripting/test.cpp b/scripting/test.cpp
new file mode 100644
index 0000000..1a378b7
--- /dev/null
+++ b/scripting/test.cpp
@@ -0,0 +1,11 @@
+#include "scripting/test.h"
+#include "scripting.h"
+
+#include <iostream>
+
+void print(lua_State *L, const char *s) {
+ lua_getglobal(L, "lua_instance");
+ Lua *lua = static_cast<Lua*>(lua_touserdata(L, -1));
+ lua_pop(L, 1);
+ lua->print(s);
+}