unsigned-manipulation functions (lua_puhsunsigned, lua_tounsigned, etc.)
deprecated
This commit is contained in:
23
lua.h
23
lua.h
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
** $Id: lua.h,v 1.306 2014/05/13 19:40:28 roberto Exp roberto $
|
||||
** $Id: lua.h,v 1.307 2014/06/10 17:41:38 roberto Exp roberto $
|
||||
** Lua - A Scripting Language
|
||||
** Lua.org, PUC-Rio, Brazil (http://www.lua.org)
|
||||
** See Copyright Notice at the end of this file
|
||||
@@ -175,7 +175,6 @@ LUA_API const char *(lua_typename) (lua_State *L, int tp);
|
||||
|
||||
LUA_API lua_Number (lua_tonumberx) (lua_State *L, int idx, int *isnum);
|
||||
LUA_API lua_Integer (lua_tointegerx) (lua_State *L, int idx, int *isnum);
|
||||
LUA_API lua_Unsigned (lua_tounsignedx) (lua_State *L, int idx, int *isnum);
|
||||
LUA_API int (lua_toboolean) (lua_State *L, int idx);
|
||||
LUA_API const char *(lua_tolstring) (lua_State *L, int idx, size_t *len);
|
||||
LUA_API size_t (lua_rawlen) (lua_State *L, int idx);
|
||||
@@ -220,7 +219,6 @@ LUA_API int (lua_compare) (lua_State *L, int idx1, int idx2, int op);
|
||||
LUA_API void (lua_pushnil) (lua_State *L);
|
||||
LUA_API void (lua_pushnumber) (lua_State *L, lua_Number n);
|
||||
LUA_API void (lua_pushinteger) (lua_State *L, lua_Integer n);
|
||||
LUA_API void (lua_pushunsigned) (lua_State *L, lua_Unsigned n);
|
||||
LUA_API const char *(lua_pushlstring) (lua_State *L, const char *s, size_t l);
|
||||
LUA_API const char *(lua_pushstring) (lua_State *L, const char *s);
|
||||
LUA_API const char *(lua_pushvfstring) (lua_State *L, const char *fmt,
|
||||
@@ -326,14 +324,13 @@ LUA_API void (lua_setallocf) (lua_State *L, lua_Alloc f, void *ud);
|
||||
|
||||
|
||||
/*
|
||||
** ===============================================================
|
||||
** {==============================================================
|
||||
** some useful macros
|
||||
** ===============================================================
|
||||
*/
|
||||
|
||||
#define lua_tonumber(L,i) lua_tonumberx(L,(i),NULL)
|
||||
#define lua_tointeger(L,i) lua_tointegerx(L,(i),NULL)
|
||||
#define lua_tounsigned(L,i) lua_tounsignedx(L,(i),NULL)
|
||||
|
||||
#define lua_pop(L,n) lua_settop(L, -(n)-1)
|
||||
|
||||
@@ -365,6 +362,22 @@ LUA_API void (lua_setallocf) (lua_State *L, lua_Alloc f, void *ud);
|
||||
|
||||
#define lua_remove(L,idx) (lua_rotate(L, (idx), -1), lua_pop(L, 1))
|
||||
|
||||
/* }============================================================== */
|
||||
|
||||
|
||||
/*
|
||||
** {==============================================================
|
||||
** compatibility macros for unsigned conversions
|
||||
** ===============================================================
|
||||
*/
|
||||
#if defined(LUA_COMPAT_APIUNSIGNED)
|
||||
|
||||
#define lua_pushunsigned(L,n) lua_pushinteger(L, (lua_Integer)(n))
|
||||
#define lua_tounsignedx(L,i,is) ((lua_Integer)lua_tointegerx(L,i,is))
|
||||
#define lua_tounsigned(L,i) lua_tounsignedx(L,(i),NULL)
|
||||
|
||||
#endif
|
||||
/* }============================================================== */
|
||||
|
||||
/*
|
||||
** {======================================================================
|
||||
|
||||
Reference in New Issue
Block a user