aboutsummaryrefslogtreecommitdiff
path: root/lua.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2003-10-07 17:13:41 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2003-10-07 17:13:41 -0300
commitf04fe526cd9de3e5460b614b2ff06268ad51872d (patch)
tree9e9fd4fc0bae4858d74c04a22d8ce5748191d5a9 /lua.h
parent21947deddc5976536665cd2397d7d5c9e6bd7e48 (diff)
downloadlua-f04fe526cd9de3e5460b614b2ff06268ad51872d.tar.gz
lua-f04fe526cd9de3e5460b614b2ff06268ad51872d.tar.bz2
lua-f04fe526cd9de3e5460b614b2ff06268ad51872d.zip
new functions `lua_tointeger' and lua_pushinteger'
Diffstat (limited to 'lua.h')
-rw-r--r--lua.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/lua.h b/lua.h
index abea10af..b0b80f43 100644
--- a/lua.h
+++ b/lua.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lua.h,v 1.178 2003/07/07 13:30:57 roberto Exp roberto $ 2** $Id: lua.h,v 1.179 2003/10/02 20:31:17 roberto Exp roberto $
3** Lua - An Extensible Extension Language 3** Lua - An Extensible Extension Language
4** Tecgraf: Computer Graphics Technology Group, PUC-Rio, Brazil 4** Tecgraf: Computer Graphics Technology Group, PUC-Rio, Brazil
5** http://www.lua.org mailto:info@lua.org 5** http://www.lua.org mailto:info@lua.org
@@ -98,6 +98,14 @@ typedef LUA_NUMBER lua_Number;
98#endif 98#endif
99 99
100 100
101/* type for integer functions */
102#ifndef LUA_INTEGER
103typedef long lua_Integer;
104#else
105typedef LUA_INTEGER lua_Integer;
106#endif
107
108
101/* mark for all API functions */ 109/* mark for all API functions */
102#ifndef LUA_API 110#ifndef LUA_API
103#define LUA_API extern 111#define LUA_API extern
@@ -144,6 +152,7 @@ LUA_API int lua_rawequal (lua_State *L, int idx1, int idx2);
144LUA_API int lua_lessthan (lua_State *L, int idx1, int idx2); 152LUA_API int lua_lessthan (lua_State *L, int idx1, int idx2);
145 153
146LUA_API lua_Number lua_tonumber (lua_State *L, int idx); 154LUA_API lua_Number lua_tonumber (lua_State *L, int idx);
155LUA_API lua_Integer lua_tointeger (lua_State *L, int idx);
147LUA_API int lua_toboolean (lua_State *L, int idx); 156LUA_API int lua_toboolean (lua_State *L, int idx);
148LUA_API const char *lua_tostring (lua_State *L, int idx); 157LUA_API const char *lua_tostring (lua_State *L, int idx);
149LUA_API size_t lua_strlen (lua_State *L, int idx); 158LUA_API size_t lua_strlen (lua_State *L, int idx);
@@ -158,6 +167,7 @@ LUA_API const void *lua_topointer (lua_State *L, int idx);
158*/ 167*/
159LUA_API void lua_pushnil (lua_State *L); 168LUA_API void lua_pushnil (lua_State *L);
160LUA_API void lua_pushnumber (lua_State *L, lua_Number n); 169LUA_API void lua_pushnumber (lua_State *L, lua_Number n);
170LUA_API void lua_pushinteger (lua_State *L, lua_Integer n);
161LUA_API void lua_pushlstring (lua_State *L, const char *s, size_t l); 171LUA_API void lua_pushlstring (lua_State *L, const char *s, size_t l);
162LUA_API void lua_pushstring (lua_State *L, const char *s); 172LUA_API void lua_pushstring (lua_State *L, const char *s);
163LUA_API const char *lua_pushvfstring (lua_State *L, const char *fmt, 173LUA_API const char *lua_pushvfstring (lua_State *L, const char *fmt,