diff options
author | Lua Team <team@lua.org> | 2014-07-31 12:00:00 +0000 |
---|---|---|
committer | repogen <> | 2014-07-31 12:00:00 +0000 |
commit | d7648e85b78d53a2248de909868192598ad0eb69 (patch) | |
tree | c67708a14fd29f8ff7e4981aadb041c5ab577e08 /src/lauxlib.h | |
parent | 3907bda05b0e73eba86487ad703e832ca14b64ce (diff) | |
download | lua-github-5.3.0-alpha.tar.gz |
Lua 5.3.0-alpha5.3.0-alpha
Diffstat (limited to 'src/lauxlib.h')
-rw-r--r-- | src/lauxlib.h | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/src/lauxlib.h b/src/lauxlib.h index 3ffe3561..b5560143 100644 --- a/src/lauxlib.h +++ b/src/lauxlib.h @@ -1,5 +1,5 @@ /* -** $Id: lauxlib.h,v 1.124 2014/04/15 18:25:49 roberto Exp $ +** $Id: lauxlib.h,v 1.125 2014/06/26 17:25:11 roberto Exp $ ** 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 |