summaryrefslogtreecommitdiff
path: root/src/lua5/imlua_aux.c
diff options
context:
space:
mode:
authorscuri <scuri>2010-06-10 20:17:40 +0000
committerscuri <scuri>2010-06-10 20:17:40 +0000
commit4fc1d102d5e300e811260a485defe5b64468d46a (patch)
treeb4ca7c229ca63bcf977e0eb1418a21c89173fc65 /src/lua5/imlua_aux.c
parent73ef92df40635b90294b04bdeaf48d4d646c82ca (diff)
*** empty log message ***
Diffstat (limited to 'src/lua5/imlua_aux.c')
-rw-r--r--src/lua5/imlua_aux.c6
1 files changed, 5 insertions, 1 deletions
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 <memory.h>
@@ -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);