aboutsummaryrefslogtreecommitdiff
path: root/lua.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2010-07-02 14:35:06 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2010-07-02 14:35:06 -0300
commita9dc7c88283a8046ad40c592f9e626d93e8e14a1 (patch)
tree693fa40d1ca9beceb5af5d4d4325401abe3f96a2 /lua.h
parent7192afafeeb1a96b3de60af90a72cd8762b09d94 (diff)
downloadlua-a9dc7c88283a8046ad40c592f9e626d93e8e14a1.tar.gz
lua-a9dc7c88283a8046ad40c592f9e626d93e8e14a1.tar.bz2
lua-a9dc7c88283a8046ad40c592f9e626d93e8e14a1.zip
functions lua_tonumber/lua_tointeger replaced by lua_tonumberx/lua_tointegerx
that have an extra out parameter with conversion status
Diffstat (limited to 'lua.h')
-rw-r--r--lua.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/lua.h b/lua.h
index 586c9388..87c81e75 100644
--- a/lua.h
+++ b/lua.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lua.h,v 1.269 2010/05/10 13:50:20 roberto Exp roberto $ 2** $Id: lua.h,v 1.270 2010/05/12 14:09:20 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
@@ -153,8 +153,8 @@ LUA_API int (lua_isuserdata) (lua_State *L, int idx);
153LUA_API int (lua_type) (lua_State *L, int idx); 153LUA_API int (lua_type) (lua_State *L, int idx);
154LUA_API const char *(lua_typename) (lua_State *L, int tp); 154LUA_API const char *(lua_typename) (lua_State *L, int tp);
155 155
156LUA_API lua_Number (lua_tonumber) (lua_State *L, int idx); 156LUA_API lua_Number (lua_tonumberx) (lua_State *L, int idx, int *isnum);
157LUA_API lua_Integer (lua_tointeger) (lua_State *L, int idx); 157LUA_API lua_Integer (lua_tointegerx) (lua_State *L, int idx, int *isnum);
158LUA_API int (lua_toboolean) (lua_State *L, int idx); 158LUA_API int (lua_toboolean) (lua_State *L, int idx);
159LUA_API const char *(lua_tolstring) (lua_State *L, int idx, size_t *len); 159LUA_API const char *(lua_tolstring) (lua_State *L, int idx, size_t *len);
160LUA_API size_t (lua_rawlen) (lua_State *L, int idx); 160LUA_API size_t (lua_rawlen) (lua_State *L, int idx);
@@ -296,6 +296,9 @@ LUA_API void (lua_setallocf) (lua_State *L, lua_Alloc f, void *ud);
296** =============================================================== 296** ===============================================================
297*/ 297*/
298 298
299#define lua_tonumber(L,i) lua_tonumberx(L,i,NULL)
300#define lua_tointeger(L,i) lua_tointegerx(L,i,NULL)
301
299#define lua_pop(L,n) lua_settop(L, -(n)-1) 302#define lua_pop(L,n) lua_settop(L, -(n)-1)
300 303
301#define lua_newtable(L) lua_createtable(L, 0, 0) 304#define lua_newtable(L) lua_createtable(L, 0, 0)