summaryrefslogtreecommitdiff
path: root/cd/src/lua5/cdluapdf5.c
diff options
context:
space:
mode:
authorNicolas "Pixel" Noble <pixel@nobis-crew.org>2010-09-09 01:48:52 +0200
committerNicolas "Pixel" Noble <pixel@nobis-crew.org>2010-09-09 01:50:25 +0200
commite9a184546b18cf3b796bd560561f312934004c54 (patch)
treeaa785af9a8d03f8ce276c9e9ecec78397005ec22 /cd/src/lua5/cdluapdf5.c
parent92efe73791d0998536042bfab5a1babc67d168c7 (diff)
Upgrading to CD 5.4 - and cleaning up.
Diffstat (limited to 'cd/src/lua5/cdluapdf5.c')
-rwxr-xr-xcd/src/lua5/cdluapdf5.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/cd/src/lua5/cdluapdf5.c b/cd/src/lua5/cdluapdf5.c
index eb3f221..7fd2ece 100755
--- a/cd/src/lua5/cdluapdf5.c
+++ b/cd/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;
}
@@ -47,7 +51,3 @@ int luaopen_cdluapdf(lua_State* L)
return cdluapdf_open(L);
}
-int luaopen_cdluapdf51(lua_State* L)
-{
- return cdluapdf_open(L);
-}