diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2003-10-07 17:13:41 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2003-10-07 17:13:41 -0300 |
commit | f04fe526cd9de3e5460b614b2ff06268ad51872d (patch) | |
tree | 9e9fd4fc0bae4858d74c04a22d8ce5748191d5a9 /lua.h | |
parent | 21947deddc5976536665cd2397d7d5c9e6bd7e48 (diff) | |
download | lua-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.h | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -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 | ||
103 | typedef long lua_Integer; | ||
104 | #else | ||
105 | typedef 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); | |||
144 | LUA_API int lua_lessthan (lua_State *L, int idx1, int idx2); | 152 | LUA_API int lua_lessthan (lua_State *L, int idx1, int idx2); |
145 | 153 | ||
146 | LUA_API lua_Number lua_tonumber (lua_State *L, int idx); | 154 | LUA_API lua_Number lua_tonumber (lua_State *L, int idx); |
155 | LUA_API lua_Integer lua_tointeger (lua_State *L, int idx); | ||
147 | LUA_API int lua_toboolean (lua_State *L, int idx); | 156 | LUA_API int lua_toboolean (lua_State *L, int idx); |
148 | LUA_API const char *lua_tostring (lua_State *L, int idx); | 157 | LUA_API const char *lua_tostring (lua_State *L, int idx); |
149 | LUA_API size_t lua_strlen (lua_State *L, int idx); | 158 | LUA_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 | */ |
159 | LUA_API void lua_pushnil (lua_State *L); | 168 | LUA_API void lua_pushnil (lua_State *L); |
160 | LUA_API void lua_pushnumber (lua_State *L, lua_Number n); | 169 | LUA_API void lua_pushnumber (lua_State *L, lua_Number n); |
170 | LUA_API void lua_pushinteger (lua_State *L, lua_Integer n); | ||
161 | LUA_API void lua_pushlstring (lua_State *L, const char *s, size_t l); | 171 | LUA_API void lua_pushlstring (lua_State *L, const char *s, size_t l); |
162 | LUA_API void lua_pushstring (lua_State *L, const char *s); | 172 | LUA_API void lua_pushstring (lua_State *L, const char *s); |
163 | LUA_API const char *lua_pushvfstring (lua_State *L, const char *fmt, | 173 | LUA_API const char *lua_pushvfstring (lua_State *L, const char *fmt, |