diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-11-26 10:53:29 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-11-26 10:53:29 -0200 |
commit | 1f55dbc69933d3641a20ada064d2b3d39e58fdaf (patch) | |
tree | 64f90ddc48b447d015bb5dc3d818c43f7b8c4391 | |
parent | c194a46bc5bfef02708126378526f17afabb9998 (diff) | |
download | lua-1f55dbc69933d3641a20ada064d2b3d39e58fdaf.tar.gz lua-1f55dbc69933d3641a20ada064d2b3d39e58fdaf.tar.bz2 lua-1f55dbc69933d3641a20ada064d2b3d39e58fdaf.zip |
details
-rw-r--r-- | lbaselib.c | 4 | ||||
-rw-r--r-- | lua.h | 18 |
2 files changed, 7 insertions, 15 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lbaselib.c,v 1.110 2002/11/25 17:33:33 roberto Exp roberto $ | 2 | ** $Id: lbaselib.c,v 1.111 2002/11/26 08:45:36 roberto Exp roberto $ |
3 | ** Basic library | 3 | ** Basic library |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -223,7 +223,7 @@ static int luaB_pairs (lua_State *L) { | |||
223 | static int luaB_ipairs (lua_State *L) { | 223 | static int luaB_ipairs (lua_State *L) { |
224 | lua_Number i = lua_tonumber(L, 2); | 224 | lua_Number i = lua_tonumber(L, 2); |
225 | luaL_checktype(L, 1, LUA_TTABLE); | 225 | luaL_checktype(L, 1, LUA_TTABLE); |
226 | if (i == 0 && lua_isnull(L, 2)) { /* `for' start? */ | 226 | if (i == 0 && lua_isnone(L, 2)) { /* `for' start? */ |
227 | lua_getglobal(L, "ipairs"); /* return generator, */ | 227 | lua_getglobal(L, "ipairs"); /* return generator, */ |
228 | lua_pushvalue(L, 1); /* state, */ | 228 | lua_pushvalue(L, 1); /* state, */ |
229 | lua_pushnumber(L, 0); /* and initial value */ | 229 | lua_pushnumber(L, 0); /* and initial value */ |
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lua.h,v 1.166 2002/11/25 17:47:13 roberto Exp roberto $ | 2 | ** $Id: lua.h,v 1.167 2002/11/25 17:50:14 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 |
@@ -10,18 +10,13 @@ | |||
10 | #ifndef lua_h | 10 | #ifndef lua_h |
11 | #define lua_h | 11 | #define lua_h |
12 | 12 | ||
13 | |||
14 | /* definition of `va_list' */ | ||
15 | #include <stdarg.h> | 13 | #include <stdarg.h> |
16 | |||
17 | /* definition of `size_t' */ | ||
18 | #include <stddef.h> | 14 | #include <stddef.h> |
19 | 15 | ||
20 | 16 | ||
21 | 17 | #define LUA_VERSION "Lua 5.0 (beta)" | |
22 | #define LUA_VERSION "Lua 5.0 (alpha)" | ||
23 | #define LUA_COPYRIGHT "Copyright (C) 1994-2002 Tecgraf, PUC-Rio" | 18 | #define LUA_COPYRIGHT "Copyright (C) 1994-2002 Tecgraf, PUC-Rio" |
24 | #define LUA_AUTHORS "W. Celes, R. Ierusalimschy & L. H. de Figueiredo" | 19 | #define LUA_AUTHORS "R. Ierusalimschy, L. H. de Figueiredo & W. Celes" |
25 | 20 | ||
26 | 21 | ||
27 | 22 | ||
@@ -43,7 +38,6 @@ | |||
43 | #define LUA_ERRSYNTAX 3 | 38 | #define LUA_ERRSYNTAX 3 |
44 | #define LUA_ERRMEM 4 | 39 | #define LUA_ERRMEM 4 |
45 | #define LUA_ERRERR 5 | 40 | #define LUA_ERRERR 5 |
46 | #define LUA_ERRTHROW 6 | ||
47 | 41 | ||
48 | 42 | ||
49 | typedef struct lua_State lua_State; | 43 | typedef struct lua_State lua_State; |
@@ -88,7 +82,7 @@ typedef int (*lua_Chunkwriter) (lua_State *L, const void* p, | |||
88 | #endif | 82 | #endif |
89 | 83 | ||
90 | 84 | ||
91 | /* type of Numbers in Lua */ | 85 | /* type of numbers in Lua */ |
92 | #ifndef LUA_NUMBER | 86 | #ifndef LUA_NUMBER |
93 | typedef double lua_Number; | 87 | typedef double lua_Number; |
94 | #else | 88 | #else |
@@ -205,7 +199,7 @@ LUA_API int lua_yield (lua_State *L, int nresults); | |||
205 | LUA_API int lua_resume (lua_State *L, int narg); | 199 | LUA_API int lua_resume (lua_State *L, int narg); |
206 | 200 | ||
207 | /* | 201 | /* |
208 | ** Garbage-collection functions | 202 | ** garbage-collection functions |
209 | */ | 203 | */ |
210 | LUA_API int lua_getgcthreshold (lua_State *L); | 204 | LUA_API int lua_getgcthreshold (lua_State *L); |
211 | LUA_API int lua_getgccount (lua_State *L); | 205 | LUA_API int lua_getgccount (lua_State *L); |
@@ -274,8 +268,6 @@ LUA_API int lua_pushupvalues (lua_State *L); | |||
274 | #define lua_getglobal(L,s) \ | 268 | #define lua_getglobal(L,s) \ |
275 | (lua_pushstring(L, s), lua_gettable(L, LUA_GLOBALSINDEX)) | 269 | (lua_pushstring(L, s), lua_gettable(L, LUA_GLOBALSINDEX)) |
276 | 270 | ||
277 | #define lua_isnull lua_isnone | ||
278 | |||
279 | 271 | ||
280 | /* compatibility with ref system */ | 272 | /* compatibility with ref system */ |
281 | 273 | ||