summaryrefslogtreecommitdiff
path: root/src/lua5/cdluapdf5.c
diff options
context:
space:
mode:
authorscuri <scuri>2010-06-10 20:17:50 +0000
committerscuri <scuri>2010-06-10 20:17:50 +0000
commit2fb345fc972465ade03cc1d527ad3c8db3438ac5 (patch)
tree3fd9b1f7e2b12fd79c2000c0f305e8ef7763364a /src/lua5/cdluapdf5.c
parentc5f7b4e29afdd70a0f05d8785619585a45916b27 (diff)
*** empty log message ***
Diffstat (limited to 'src/lua5/cdluapdf5.c')
-rw-r--r--src/lua5/cdluapdf5.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lua5/cdluapdf5.c b/src/lua5/cdluapdf5.c
index 40877ad..7fd2ece 100644
--- a/src/lua5/cdluapdf5.c
+++ b/src/lua5/cdluapdf5.c
@@ -37,7 +37,11 @@ int cdluapdf_open (lua_State *L)
{
cdluaLuaState* cdL = cdlua_getstate(L);
lua_pushliteral(L, "cd");
+#if LUA_VERSION_NUM > 501
+ lua_pushglobaltable(L);
+#else
lua_gettable(L, LUA_GLOBALSINDEX); /* leave "cd" table at the top of the stack */
+#endif
cdlua_addcontext(L, cdL, &cdluapdfctx);
return 1;
}