summaryrefslogtreecommitdiff
path: root/lauxlib.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-06-26 15:38:28 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-06-26 15:38:28 -0300
commita77d263e86feea55529800028f960d7124c1385f (patch)
tree88bc21289c5ef341a7f3509c067524fea7003049 /lauxlib.h
parent7cc40851e1d1a18a4c45fca31dbccd4206050b11 (diff)
downloadlua-github-a77d263e86feea55529800028f960d7124c1385f.tar.gz
unsigned-manipulation functions (lua_puhsunsigned, lua_tounsigned, etc.)
deprecated
Diffstat (limited to 'lauxlib.h')
-rw-r--r--lauxlib.h21
1 files changed, 17 insertions, 4 deletions
diff --git a/lauxlib.h b/lauxlib.h
index d3ed988a..866f66af 100644
--- a/lauxlib.h
+++ b/lauxlib.h
@@ -1,5 +1,5 @@
/*
-** $Id: lauxlib.h,v 1.123 2014/01/05 14:04:46 roberto Exp roberto $
+** $Id: lauxlib.h,v 1.124 2014/04/15 18:25:49 roberto Exp roberto $
** Auxiliary functions for building Lua libraries
** See Copyright Notice in lua.h
*/
@@ -46,9 +46,6 @@ LUALIB_API lua_Number (luaL_optnumber) (lua_State *L, int arg, lua_Number def);
LUALIB_API lua_Integer (luaL_checkinteger) (lua_State *L, int arg);
LUALIB_API lua_Integer (luaL_optinteger) (lua_State *L, int arg,
lua_Integer def);
-LUALIB_API lua_Unsigned (luaL_checkunsigned) (lua_State *L, int arg);
-LUALIB_API lua_Unsigned (luaL_optunsigned) (lua_State *L, int arg,
- lua_Unsigned def);
LUALIB_API void (luaL_checkstack) (lua_State *L, int sz, const char *msg);
LUALIB_API void (luaL_checktype) (lua_State *L, int arg, int t);
@@ -211,6 +208,22 @@ LUALIB_API void (luaL_openlib) (lua_State *L, const char *libname,
#endif
+/*
+** {============================================================
+** Compatibility with deprecated unsigned conversions
+** =============================================================
+*/
+#if defined(LUA_COMPAT_APIUNSIGNED)
+
+#define luaL_checkunsigned(L,a) ((lua_Unsigned)luaL_checkinteger(L,a))
+#define luaL_optunsigned(L,a,d) \
+ ((lua_Unsigned)luaL_optinteger(L,a,(lua_Integer)(d)))
+
+#endif
+/* }============================================================ */
+
+
+
#endif