diff options
author | Thijs Schreijer <thijs@thijsschreijer.nl> | 2013-04-12 11:37:53 +0200 |
---|---|---|
committer | Thijs Schreijer <thijs@thijsschreijer.nl> | 2013-04-12 11:37:53 +0200 |
commit | b50c93e4c3f094f517b6384e81aa9117da10b78d (patch) | |
tree | fd3ddbe5c78c537cbf9eec152855de8b996b0da6 /src/bin | |
parent | 6b3d15de3ea55a0e0a784bf9aec241b5f4f3ca0d (diff) | |
download | luarocks-b50c93e4c3f094f517b6384e81aa9117da10b78d.tar.gz luarocks-b50c93e4c3f094f517b6384e81aa9117da10b78d.tar.bz2 luarocks-b50c93e4c3f094f517b6384e81aa9117da10b78d.zip |
5.2 compatibility for the launcher wrapper.
Diffstat (limited to 'src/bin')
-rw-r--r-- | src/bin/rclauncher.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/bin/rclauncher.c b/src/bin/rclauncher.c index 4a99c491..60284638 100644 --- a/src/bin/rclauncher.c +++ b/src/bin/rclauncher.c | |||
@@ -35,8 +35,7 @@ static int runlua (lua_State *L, const char *lua_string, int argc, char *argv[]) | |||
35 | int err_func; | 35 | int err_func; |
36 | int err; | 36 | int err; |
37 | 37 | ||
38 | lua_pushliteral(L, "debug"); | 38 | lua_getglobal(L, "debug"); |
39 | lua_rawget(L, LUA_GLOBALSINDEX); /* get traceback function */ | ||
40 | lua_pushliteral(L, "traceback"); | 39 | lua_pushliteral(L, "traceback"); |
41 | lua_gettable(L, -2); | 40 | lua_gettable(L, -2); |
42 | err_func = lua_gettop (L); | 41 | err_func = lua_gettop (L); |
@@ -90,7 +89,7 @@ int main (int argc, char *argv[]) { | |||
90 | TCHAR lua_wstring[4098]; | 89 | TCHAR lua_wstring[4098]; |
91 | #endif | 90 | #endif |
92 | char lua_string[4098]; | 91 | char lua_string[4098]; |
93 | lua_State *L = lua_open(); | 92 | lua_State *L = luaL_newstate(); |
94 | (void)argc; /* avoid "unused parameter" warning */ | 93 | (void)argc; /* avoid "unused parameter" warning */ |
95 | luaL_openlibs(L); | 94 | luaL_openlibs(L); |
96 | lua_newtable(L); // create arg table | 95 | lua_newtable(L); // create arg table |