diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2011-05-20 14:11:40 +0200 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2011-05-20 14:11:40 +0200 |
commit | 3bb33734a92e86024488adf88dc2a368c8c952b2 (patch) | |
tree | aee8ab7832b7fef021668d94cbaf7d21d6c9c839 /scripting/test.cpp | |
parent | 7b22d822f9871222fbbe401c9c79d6a624d21331 (diff) |
Basic lua implementation.
Diffstat (limited to 'scripting/test.cpp')
-rw-r--r-- | scripting/test.cpp | 11 |
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); +} |