diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-06-26 15:38:28 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-06-26 15:38:28 -0300 |
commit | a77d263e86feea55529800028f960d7124c1385f (patch) | |
tree | 88bc21289c5ef341a7f3509c067524fea7003049 /lauxlib.c | |
parent | 7cc40851e1d1a18a4c45fca31dbccd4206050b11 (diff) | |
download | lua-a77d263e86feea55529800028f960d7124c1385f.tar.gz lua-a77d263e86feea55529800028f960d7124c1385f.tar.bz2 lua-a77d263e86feea55529800028f960d7124c1385f.zip |
unsigned-manipulation functions (lua_puhsunsigned, lua_tounsigned, etc.)
deprecated
Diffstat (limited to 'lauxlib.c')
-rw-r--r-- | lauxlib.c | 17 |
1 files changed, 1 insertions, 16 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lauxlib.c,v 1.262 2014/04/15 18:25:49 roberto Exp roberto $ | 2 | ** $Id: lauxlib.c,v 1.263 2014/05/12 21:44:17 roberto Exp roberto $ |
3 | ** Auxiliary functions for building Lua libraries | 3 | ** Auxiliary functions for building Lua libraries |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -413,26 +413,11 @@ LUALIB_API lua_Integer luaL_checkinteger (lua_State *L, int arg) { | |||
413 | } | 413 | } |
414 | 414 | ||
415 | 415 | ||
416 | LUALIB_API lua_Unsigned luaL_checkunsigned (lua_State *L, int arg) { | ||
417 | int isnum; | ||
418 | lua_Unsigned d = lua_tounsignedx(L, arg, &isnum); | ||
419 | if (!isnum) | ||
420 | interror(L, arg); | ||
421 | return d; | ||
422 | } | ||
423 | |||
424 | |||
425 | LUALIB_API lua_Integer luaL_optinteger (lua_State *L, int arg, | 416 | LUALIB_API lua_Integer luaL_optinteger (lua_State *L, int arg, |
426 | lua_Integer def) { | 417 | lua_Integer def) { |
427 | return luaL_opt(L, luaL_checkinteger, arg, def); | 418 | return luaL_opt(L, luaL_checkinteger, arg, def); |
428 | } | 419 | } |
429 | 420 | ||
430 | |||
431 | LUALIB_API lua_Unsigned luaL_optunsigned (lua_State *L, int arg, | ||
432 | lua_Unsigned def) { | ||
433 | return luaL_opt(L, luaL_checkunsigned, arg, def); | ||
434 | } | ||
435 | |||
436 | /* }====================================================== */ | 421 | /* }====================================================== */ |
437 | 422 | ||
438 | 423 | ||