From ea36603015ab31469aa59eff8ee09880d006f83d Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Thu, 11 Mar 2010 10:45:43 +0800 Subject: lua plugin hello world is ok. --- lua/test-lua-plugin.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 lua/test-lua-plugin.c (limited to 'lua/test-lua-plugin.c') diff --git a/lua/test-lua-plugin.c b/lua/test-lua-plugin.c new file mode 100644 index 0000000..5dec834 --- /dev/null +++ b/lua/test-lua-plugin.c @@ -0,0 +1,21 @@ +#include + +#include "lua.h" +#include "lualib.h" +#include "lauxlib.h" + +#include "lua-plugin.h" + +static lua_State * L = NULL; + +int main(int argc, char * argv[]){ + printf("starting test...\n"); + + /* initialize Lua */ + L = lua_open(); + + lua_plugin_init(L); + luaL_dofile(L, "test.lua"); + lua_plugin_fini(L); + return 0; +} -- cgit