aboutsummaryrefslogtreecommitdiff
path: root/lua.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2010-10-25 18:31:11 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2010-10-25 18:31:11 -0200
commitc6b64ffe65549b179bfa565e8329430857e335ee (patch)
tree9fa644de3c5dc2e4edf42aac7249b42264f2f6e5 /lua.h
parent4590a89b32b62c75fca7ced96c282c7793b8885c (diff)
downloadlua-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.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/lua.h b/lua.h
index 42c34ea5..a5b6086c 100644
--- a/lua.h
+++ b/lua.h
@@ -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 */
107typedef LUA_INTEGER lua_Integer; 107typedef LUA_INTEGER lua_Integer;
108 108
109/* unsigned integer type */
110typedef 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
160LUA_API lua_Number (lua_tonumberx) (lua_State *L, int idx, int *isnum); 163LUA_API lua_Number (lua_tonumberx) (lua_State *L, int idx, int *isnum);
161LUA_API lua_Integer (lua_tointegerx) (lua_State *L, int idx, int *isnum); 164LUA_API lua_Integer (lua_tointegerx) (lua_State *L, int idx, int *isnum);
165LUA_API lua_Unsigned (lua_tounsignedx) (lua_State *L, int idx, int *isnum);
162LUA_API int (lua_toboolean) (lua_State *L, int idx); 166LUA_API int (lua_toboolean) (lua_State *L, int idx);
163LUA_API const char *(lua_tolstring) (lua_State *L, int idx, size_t *len); 167LUA_API const char *(lua_tolstring) (lua_State *L, int idx, size_t *len);
164LUA_API size_t (lua_rawlen) (lua_State *L, int idx); 168LUA_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);
196LUA_API void (lua_pushnil) (lua_State *L); 200LUA_API void (lua_pushnil) (lua_State *L);
197LUA_API void (lua_pushnumber) (lua_State *L, lua_Number n); 201LUA_API void (lua_pushnumber) (lua_State *L, lua_Number n);
198LUA_API void (lua_pushinteger) (lua_State *L, lua_Integer n); 202LUA_API void (lua_pushinteger) (lua_State *L, lua_Integer n);
203LUA_API void (lua_pushunsigned) (lua_State *L, lua_Unsigned n);
199LUA_API const char *(lua_pushlstring) (lua_State *L, const char *s, size_t l); 204LUA_API const char *(lua_pushlstring) (lua_State *L, const char *s, size_t l);
200LUA_API const char *(lua_pushstring) (lua_State *L, const char *s); 205LUA_API const char *(lua_pushstring) (lua_State *L, const char *s);
201LUA_API const char *(lua_pushvfstring) (lua_State *L, const char *fmt, 206LUA_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