aboutsummaryrefslogtreecommitdiff
path: root/c-api/compat-5.3.h
diff options
context:
space:
mode:
authorPhilipp Janda <siffiejoe@gmx.net>2015-01-20 01:02:20 +0100
committerPhilipp Janda <siffiejoe@gmx.net>2015-01-20 01:02:20 +0100
commit489cd678823e0981ff2e4d2544b84094ed23c587 (patch)
tree2855dbabb9205957434129aa1119cb526d2ae01b /c-api/compat-5.3.h
parentf7f85b0826f7006b8dcc040111cd0ef8d42c2352 (diff)
downloadlua-compat-5.3-489cd678823e0981ff2e4d2544b84094ed23c587.tar.gz
lua-compat-5.3-489cd678823e0981ff2e4d2544b84094ed23c587.tar.bz2
lua-compat-5.3-489cd678823e0981ff2e4d2544b84094ed23c587.zip
add lua_arith and lua_compare for Lua 5.1
Diffstat (limited to 'c-api/compat-5.3.h')
-rw-r--r--c-api/compat-5.3.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/c-api/compat-5.3.h b/c-api/compat-5.3.h
index b288126..3905a10 100644
--- a/c-api/compat-5.3.h
+++ b/c-api/compat-5.3.h
@@ -40,8 +40,6 @@
40#if defined(LUA_VERSION_NUM) && LUA_VERSION_NUM == 501 40#if defined(LUA_VERSION_NUM) && LUA_VERSION_NUM == 501
41 41
42/* XXX not implemented: 42/* XXX not implemented:
43 * lua_arith
44 * lua_compare
45 * lua_upvalueid 43 * lua_upvalueid
46 * lua_upvaluejoin 44 * lua_upvaluejoin
47 * lua_version 45 * lua_version
@@ -63,6 +61,16 @@
63#endif 61#endif
64 62
65#define LUA_OK 0 63#define LUA_OK 0
64#define LUA_OPADD 0
65#define LUA_OPSUB 1
66#define LUA_OPMUL 2
67#define LUA_OPDIV 3
68#define LUA_OPMOD 4
69#define LUA_OPPOW 5
70#define LUA_OPUNM 6
71#define LUA_OPEQ 0
72#define LUA_OPLT 1
73#define LUA_OPLE 2
66 74
67typedef struct luaL_Stream { 75typedef struct luaL_Stream {
68 FILE *f; 76 FILE *f;
@@ -74,6 +82,12 @@ typedef size_t lua_Unsigned;
74#define lua_absindex COMPAT53_CONCAT(COMPAT53_PREFIX, _absindex) 82#define lua_absindex COMPAT53_CONCAT(COMPAT53_PREFIX, _absindex)
75COMPAT53_API int lua_absindex (lua_State *L, int i); 83COMPAT53_API int lua_absindex (lua_State *L, int i);
76 84
85#define lua_arith COMPAT53_CONCAT(COMPAT53_PREFIX, _arith)
86COMPAT53_API void lua_arith (lua_State *L, int op);
87
88#define lua_compare COMPAT53_CONCAT(COMPAT53_PREFIX, _compare)
89COMPAT53_API int lua_compare (lua_State *L, int idx1, int idx2, int op);
90
77#define lua_copy COMPAT53_CONCAT(COMPAT53_PREFIX, _copy) 91#define lua_copy COMPAT53_CONCAT(COMPAT53_PREFIX, _copy)
78COMPAT53_API void lua_copy (lua_State *L, int from, int to); 92COMPAT53_API void lua_copy (lua_State *L, int from, int to);
79 93