From 4fc1d102d5e300e811260a485defe5b64468d46a Mon Sep 17 00:00:00 2001 From: scuri Date: Thu, 10 Jun 2010 20:17:40 +0000 Subject: *** empty log message *** --- src/lua5/imlua_aux.c | 6 +++++- src/lua5/imlua_process.c | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/lua5/imlua_aux.c b/src/lua5/imlua_aux.c index b26df93..ef972b2 100644 --- a/src/lua5/imlua_aux.c +++ b/src/lua5/imlua_aux.c @@ -2,7 +2,7 @@ * \brief IM Lua 5 Binding * * See Copyright Notice in im_lib.h - * $Id: imlua_aux.c,v 1.3 2010/01/21 18:24:22 scuri Exp $ + * $Id: imlua_aux.c,v 1.4 2010/06/10 20:17:40 scuri Exp $ */ #include @@ -27,7 +27,11 @@ int imlua_getn (lua_State *L, int index) { int n; lua_pushstring(L, "table"); +#if LUA_VERSION_NUM > 501 + lua_pushglobaltable(L); +#else lua_gettable(L, LUA_GLOBALSINDEX); +#endif lua_pushstring(L, "getn"); lua_gettable(L, -2); lua_pushvalue(L, index); diff --git a/src/lua5/imlua_process.c b/src/lua5/imlua_process.c index 79239f0..2e0bb1d 100644 --- a/src/lua5/imlua_process.c +++ b/src/lua5/imlua_process.c @@ -2,7 +2,7 @@ * \brief IM Lua 5 Binding * * See Copyright Notice in im_lib.h - * $Id: imlua_process.c,v 1.12 2010/06/07 20:59:32 scuri Exp $ + * $Id: imlua_process.c,v 1.13 2010/06/10 20:17:40 scuri Exp $ */ #include @@ -1805,7 +1805,11 @@ static int imluaProcessMultipleStdDev (lua_State *L) luaL_argerror(L, 1, "must be a table"); lua_pushstring(L, "table"); +#if LUA_VERSION_NUM > 501 + lua_pushglobaltable(L); +#else lua_gettable(L, LUA_GLOBALSINDEX); +#endif lua_pushstring(L, "getn"); lua_gettable(L, -2); src_image_count = luaL_checkint(L, -1); -- cgit v1.2.3