aboutsummaryrefslogtreecommitdiff
path: root/lprefix.h
diff options
context:
space:
mode:
authorPhilipp Janda <siffiejoe@gmx.net>2015-01-19 19:12:24 +0100
committerPhilipp Janda <siffiejoe@gmx.net>2015-01-19 19:12:24 +0100
commitf7f85b0826f7006b8dcc040111cd0ef8d42c2352 (patch)
tree504dc073a89e2b5483aabb0778db6c438d15ed6d /lprefix.h
parent6a55913a7f53d16e65f23a7c4e5ac7c2edfbf47a (diff)
downloadlua-compat-5.3-f7f85b0826f7006b8dcc040111cd0ef8d42c2352.tar.gz
lua-compat-5.3-f7f85b0826f7006b8dcc040111cd0ef8d42c2352.tar.bz2
lua-compat-5.3-f7f85b0826f7006b8dcc040111cd0ef8d42c2352.zip
prepare to use ltablib.c from 5.3 for table library
Diffstat (limited to 'lprefix.h')
-rw-r--r--lprefix.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/lprefix.h b/lprefix.h
index 788da4e..0d25065 100644
--- a/lprefix.h
+++ b/lprefix.h
@@ -52,5 +52,22 @@
52# define luaopen_utf8 luaopen_compat53_utf8 52# define luaopen_utf8 luaopen_compat53_utf8
53#endif 53#endif
54 54
55#ifdef ltablib_c
56# define luaopen_table luaopen_compat53_table
57static int compat53_rawgeti (lua_State *L, int i, lua_Integer n) {
58 return lua_rawgeti(L, i, n);
59}
60# undef lua_rawgeti
61# define lua_rawgeti compat53_rawgeti
62static void compat53_rawseti (lua_State *L, int i, lua_Integer n) {
63 lua_rawseti(L, i, (int)n);
64}
65# undef lua_rawseti
66# define lua_rawseti compat53_rawseti
67# if LUA_VERSION_NUM == 501
68# define lua_compare(L, a, b, op) lua_lessthan(L, a, b)
69# endif
70#endif /* ltablib_c */
71
55#endif 72#endif
56 73