aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/compat53/c-api/compat-5.3.h
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/compat53/c-api/compat-5.3.h')
-rw-r--r--vendor/compat53/c-api/compat-5.3.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/vendor/compat53/c-api/compat-5.3.h b/vendor/compat53/c-api/compat-5.3.h
index 755c23e..8e10893 100644
--- a/vendor/compat53/c-api/compat-5.3.h
+++ b/vendor/compat53/c-api/compat-5.3.h
@@ -165,8 +165,7 @@ COMPAT53_API void lua_rawsetp(lua_State *L, int i, const void *p);
#define lua_rawlen(L, i) lua_objlen((L), (i))
-#define lua_tointegerx COMPAT53_CONCAT(COMPAT53_PREFIX, _tointegerx)
-COMPAT53_API lua_Integer lua_tointegerx (lua_State *L, int i, int *isnum);
+#define lua_tointeger(L, i) lua_tointegerx((L), (i), NULL)
#define lua_tonumberx COMPAT53_CONCAT(COMPAT53_PREFIX, _tonumberx)
COMPAT53_API lua_Number lua_tonumberx (lua_State *L, int i, int *isnum);
@@ -297,6 +296,9 @@ COMPAT53_API int lua_geti (lua_State *L, int index, lua_Integer i);
#define lua_isinteger COMPAT53_CONCAT(COMPAT53_PREFIX, _isinteger)
COMPAT53_API int lua_isinteger (lua_State *L, int index);
+#define lua_tointegerx COMPAT53_CONCAT(COMPAT53_PREFIX, _tointegerx_53)
+COMPAT53_API lua_Integer lua_tointegerx (lua_State *L, int i, int *isnum);
+
#define lua_numbertointeger(n, p) \
((*(p) = (lua_Integer)(n)), 1)