diff options
author | Philipp Janda <siffiejoe@gmx.net> | 2015-01-20 01:02:20 +0100 |
---|---|---|
committer | Philipp Janda <siffiejoe@gmx.net> | 2015-01-20 01:02:20 +0100 |
commit | 489cd678823e0981ff2e4d2544b84094ed23c587 (patch) | |
tree | 2855dbabb9205957434129aa1119cb526d2ae01b /c-api/compat-5.3.h | |
parent | f7f85b0826f7006b8dcc040111cd0ef8d42c2352 (diff) | |
download | lua-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.h | 18 |
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 | ||
67 | typedef struct luaL_Stream { | 75 | typedef 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) |
75 | COMPAT53_API int lua_absindex (lua_State *L, int i); | 83 | COMPAT53_API int lua_absindex (lua_State *L, int i); |
76 | 84 | ||
85 | #define lua_arith COMPAT53_CONCAT(COMPAT53_PREFIX, _arith) | ||
86 | COMPAT53_API void lua_arith (lua_State *L, int op); | ||
87 | |||
88 | #define lua_compare COMPAT53_CONCAT(COMPAT53_PREFIX, _compare) | ||
89 | COMPAT53_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) |
78 | COMPAT53_API void lua_copy (lua_State *L, int from, int to); | 92 | COMPAT53_API void lua_copy (lua_State *L, int from, int to); |
79 | 93 | ||