diff options
author | Philipp Janda <siffiejoe@gmx.net> | 2015-01-24 03:54:43 +0100 |
---|---|---|
committer | Philipp Janda <siffiejoe@gmx.net> | 2015-01-24 03:54:43 +0100 |
commit | f26591c9948818a50285003b5e00afd15f872fea (patch) | |
tree | 8f1174083cb63ed8c8636266e13f5ec98125eac7 | |
parent | ddf17edc80948d47af84f5977028df9611c75fff (diff) | |
download | lua-compat-5.3-f26591c9948818a50285003b5e00afd15f872fea.tar.gz lua-compat-5.3-f26591c9948818a50285003b5e00afd15f872fea.tar.bz2 lua-compat-5.3-f26591c9948818a50285003b5e00afd15f872fea.zip |
minor fixes
-rw-r--r-- | c-api/compat-5.3.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/c-api/compat-5.3.c b/c-api/compat-5.3.c index 1f00180..599094d 100644 --- a/c-api/compat-5.3.c +++ b/c-api/compat-5.3.c | |||
@@ -67,7 +67,7 @@ static const char compat53_arith_code[] = { | |||
67 | }; | 67 | }; |
68 | 68 | ||
69 | COMPAT53_API void lua_arith (lua_State *L, int op) { | 69 | COMPAT53_API void lua_arith (lua_State *L, int op) { |
70 | if( op < LUA_OPADD && op > LUA_OPUNM ) | 70 | if (op < LUA_OPADD && op > LUA_OPUNM) |
71 | luaL_error(L, "invalid 'op' argument for lua_arith"); | 71 | luaL_error(L, "invalid 'op' argument for lua_arith"); |
72 | luaL_checkstack(L, 5, "not enough stack slots"); | 72 | luaL_checkstack(L, 5, "not enough stack slots"); |
73 | if (op == LUA_OPUNM) | 73 | if (op == LUA_OPUNM) |
@@ -80,8 +80,7 @@ COMPAT53_API void lua_arith (lua_State *L, int op) { | |||
80 | 80 | ||
81 | 81 | ||
82 | static const char compat53_compare_code[] = { | 82 | static const char compat53_compare_code[] = { |
83 | 'l', 'o', 'c', 'a', 'l', ' ', 'a', ',', 'b', | 83 | 'l', 'o', 'c', 'a', 'l', ' ', 'a', ',', 'b', '=', '.', '.', '.', '\n', |
84 | '=', '.', '.', '.', '\n', | ||
85 | 'r', 'e', 't', 'u', 'r', 'n', ' ', 'a', '<', '=', 'b', '\n', '\0' | 84 | 'r', 'e', 't', 'u', 'r', 'n', ' ', 'a', '<', '=', 'b', '\n', '\0' |
86 | }; | 85 | }; |
87 | 86 | ||
@@ -93,7 +92,7 @@ COMPAT53_API int lua_compare (lua_State *L, int idx1, int idx2, int op) { | |||
93 | case LUA_OPLT: | 92 | case LUA_OPLT: |
94 | return lua_lessthan(L, idx1, idx2); | 93 | return lua_lessthan(L, idx1, idx2); |
95 | case LUA_OPLE: | 94 | case LUA_OPLE: |
96 | luaL_checkstack(L, 4, "not enough stack slots"); | 95 | luaL_checkstack(L, 5, "not enough stack slots"); |
97 | idx1 = lua_absindex(L, idx1); | 96 | idx1 = lua_absindex(L, idx1); |
98 | idx2 = lua_absindex(L, idx2); | 97 | idx2 = lua_absindex(L, idx2); |
99 | lua_pushvalue(L, idx1); | 98 | lua_pushvalue(L, idx1); |