diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2010-10-25 18:31:11 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2010-10-25 18:31:11 -0200 |
commit | c6b64ffe65549b179bfa565e8329430857e335ee (patch) | |
tree | 9fa644de3c5dc2e4edf42aac7249b42264f2f6e5 /lua.h | |
parent | 4590a89b32b62c75fca7ced96c282c7793b8885c (diff) | |
download | lua-c6b64ffe65549b179bfa565e8329430857e335ee.tar.gz lua-c6b64ffe65549b179bfa565e8329430857e335ee.tar.bz2 lua-c6b64ffe65549b179bfa565e8329430857e335ee.zip |
new type lua_Unsigned and corresponding projection/injection functions
Diffstat (limited to 'lua.h')
-rw-r--r-- | lua.h | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lua.h,v 1.273 2010/07/25 15:18:19 roberto Exp roberto $ | 2 | ** $Id: lua.h,v 1.274 2010/09/03 14:14:01 roberto Exp roberto $ |
3 | ** Lua - A Scripting Language | 3 | ** Lua - A Scripting Language |
4 | ** Lua.org, PUC-Rio, Brazil (http://www.lua.org) | 4 | ** Lua.org, PUC-Rio, Brazil (http://www.lua.org) |
5 | ** See Copyright Notice at the end of this file | 5 | ** See Copyright Notice at the end of this file |
@@ -106,6 +106,9 @@ typedef LUA_NUMBER lua_Number; | |||
106 | /* type for integer functions */ | 106 | /* type for integer functions */ |
107 | typedef LUA_INTEGER lua_Integer; | 107 | typedef LUA_INTEGER lua_Integer; |
108 | 108 | ||
109 | /* unsigned integer type */ | ||
110 | typedef unsigned LUA_INT32 lua_Unsigned; | ||
111 | |||
109 | 112 | ||
110 | 113 | ||
111 | /* | 114 | /* |
@@ -159,6 +162,7 @@ LUA_API const char *(lua_typename) (lua_State *L, int tp); | |||
159 | 162 | ||
160 | LUA_API lua_Number (lua_tonumberx) (lua_State *L, int idx, int *isnum); | 163 | LUA_API lua_Number (lua_tonumberx) (lua_State *L, int idx, int *isnum); |
161 | LUA_API lua_Integer (lua_tointegerx) (lua_State *L, int idx, int *isnum); | 164 | LUA_API lua_Integer (lua_tointegerx) (lua_State *L, int idx, int *isnum); |
165 | LUA_API lua_Unsigned (lua_tounsignedx) (lua_State *L, int idx, int *isnum); | ||
162 | LUA_API int (lua_toboolean) (lua_State *L, int idx); | 166 | LUA_API int (lua_toboolean) (lua_State *L, int idx); |
163 | LUA_API const char *(lua_tolstring) (lua_State *L, int idx, size_t *len); | 167 | LUA_API const char *(lua_tolstring) (lua_State *L, int idx, size_t *len); |
164 | LUA_API size_t (lua_rawlen) (lua_State *L, int idx); | 168 | LUA_API size_t (lua_rawlen) (lua_State *L, int idx); |
@@ -196,6 +200,7 @@ LUA_API int (lua_compare) (lua_State *L, int idx1, int idx2, int op); | |||
196 | LUA_API void (lua_pushnil) (lua_State *L); | 200 | LUA_API void (lua_pushnil) (lua_State *L); |
197 | LUA_API void (lua_pushnumber) (lua_State *L, lua_Number n); | 201 | LUA_API void (lua_pushnumber) (lua_State *L, lua_Number n); |
198 | LUA_API void (lua_pushinteger) (lua_State *L, lua_Integer n); | 202 | LUA_API void (lua_pushinteger) (lua_State *L, lua_Integer n); |
203 | LUA_API void (lua_pushunsigned) (lua_State *L, lua_Unsigned n); | ||
199 | LUA_API const char *(lua_pushlstring) (lua_State *L, const char *s, size_t l); | 204 | LUA_API const char *(lua_pushlstring) (lua_State *L, const char *s, size_t l); |
200 | LUA_API const char *(lua_pushstring) (lua_State *L, const char *s); | 205 | LUA_API const char *(lua_pushstring) (lua_State *L, const char *s); |
201 | LUA_API const char *(lua_pushvfstring) (lua_State *L, const char *fmt, | 206 | LUA_API const char *(lua_pushvfstring) (lua_State *L, const char *fmt, |
@@ -303,6 +308,7 @@ LUA_API void (lua_setallocf) (lua_State *L, lua_Alloc f, void *ud); | |||
303 | 308 | ||
304 | #define lua_tonumber(L,i) lua_tonumberx(L,i,NULL) | 309 | #define lua_tonumber(L,i) lua_tonumberx(L,i,NULL) |
305 | #define lua_tointeger(L,i) lua_tointegerx(L,i,NULL) | 310 | #define lua_tointeger(L,i) lua_tointegerx(L,i,NULL) |
311 | #define lua_tounsigned(L,i) lua_tounsignedx(L,i,NULL) | ||
306 | 312 | ||
307 | #define lua_pop(L,n) lua_settop(L, -(n)-1) | 313 | #define lua_pop(L,n) lua_settop(L, -(n)-1) |
308 | 314 | ||