unsigned-manipulation functions (lua_puhsunsigned, lua_tounsigned, etc.)

deprecated
This commit is contained in:
Roberto Ierusalimschy
2014-06-26 15:38:28 -03:00
parent 7cc40851e1
commit a77d263e86
6 changed files with 46 additions and 32 deletions

View File

@@ -1,5 +1,5 @@
/*
** $Id: lauxlib.c,v 1.262 2014/04/15 18:25:49 roberto Exp roberto $
** $Id: lauxlib.c,v 1.263 2014/05/12 21:44:17 roberto Exp roberto $
** Auxiliary functions for building Lua libraries
** See Copyright Notice in lua.h
*/
@@ -413,26 +413,11 @@ LUALIB_API lua_Integer luaL_checkinteger (lua_State *L, int arg) {
}
LUALIB_API lua_Unsigned luaL_checkunsigned (lua_State *L, int arg) {
int isnum;
lua_Unsigned d = lua_tounsignedx(L, arg, &isnum);
if (!isnum)
interror(L, arg);
return d;
}
LUALIB_API lua_Integer luaL_optinteger (lua_State *L, int arg,
lua_Integer def) {
return luaL_opt(L, luaL_checkinteger, arg, def);
}
LUALIB_API lua_Unsigned luaL_optunsigned (lua_State *L, int arg,
lua_Unsigned def) {
return luaL_opt(L, luaL_checkunsigned, arg, def);
}
/* }====================================================== */