diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-06-26 13:37:23 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-06-26 13:37:23 -0300 |
commit | 88607acc2c41c2bace172b78012d2ce9abf05766 (patch) | |
tree | 6283e23fe6acce3fb68e0abeb2410e7cdf816f90 | |
parent | 6de93e29321bedb4f9ebd14bdcc04b942b0aad57 (diff) | |
download | lua-88607acc2c41c2bace172b78012d2ce9abf05766.tar.gz lua-88607acc2c41c2bace172b78012d2ce9abf05766.tar.bz2 lua-88607acc2c41c2bace172b78012d2ce9abf05766.zip |
details
-rw-r--r-- | lapi.c | 6 | ||||
-rw-r--r-- | lbaselib.c | 6 | ||||
-rw-r--r-- | ldo.c | 6 | ||||
-rw-r--r-- | liolib.c | 4 | ||||
-rw-r--r-- | lparser.c | 4 |
5 files changed, 13 insertions, 13 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lapi.c,v 1.201 2002/06/20 20:41:46 roberto Exp roberto $ | 2 | ** $Id: lapi.c,v 1.202 2002/06/24 13:08:45 roberto Exp roberto $ |
3 | ** Lua API | 3 | ** Lua API |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -426,7 +426,7 @@ LUA_API void lua_gettable (lua_State *L, int index) { | |||
426 | const TObject *v; | 426 | const TObject *v; |
427 | lua_lock(L); | 427 | lua_lock(L); |
428 | t = luaA_index(L, index); | 428 | t = luaA_index(L, index); |
429 | v = luaV_gettable(L, t, L->top-1); | 429 | v = luaV_gettable(L, t, L->top-1, 0); |
430 | setobj(L->top - 1, v); | 430 | setobj(L->top - 1, v); |
431 | lua_unlock(L); | 431 | lua_unlock(L); |
432 | } | 432 | } |
@@ -597,7 +597,7 @@ LUA_API int lua_setglobals (lua_State *L, int level) { | |||
597 | ** `load' and `call' functions (run Lua code) | 597 | ** `load' and `call' functions (run Lua code) |
598 | */ | 598 | */ |
599 | 599 | ||
600 | LUA_API void lua_upcall (lua_State *L, int nargs, int nresults) { | 600 | LUA_API void lua_call (lua_State *L, int nargs, int nresults) { |
601 | StkId func; | 601 | StkId func; |
602 | lua_lock(L); | 602 | lua_lock(L); |
603 | api_checknelems(L, nargs+1); | 603 | api_checknelems(L, nargs+1); |
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lbaselib.c,v 1.84 2002/06/24 17:23:16 roberto Exp roberto $ | 2 | ** $Id: lbaselib.c,v 1.85 2002/06/25 19:19:33 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 | */ |
@@ -357,7 +357,7 @@ static int luaB_newproxy (lua_State *L) { | |||
357 | #endif | 357 | #endif |
358 | 358 | ||
359 | #ifndef LUA_PATH_DEFAULT | 359 | #ifndef LUA_PATH_DEFAULT |
360 | #define LUA_PATH_DEFAULT "?.lua" | 360 | #define LUA_PATH_DEFAULT "?;?.lua" |
361 | #endif | 361 | #endif |
362 | 362 | ||
363 | 363 | ||
@@ -403,7 +403,7 @@ static int luaB_require (lua_State *L) { | |||
403 | lua_pushvalue(L, 1); | 403 | lua_pushvalue(L, 1); |
404 | lua_setglobal(L, "_REQUIREDNAME"); | 404 | lua_setglobal(L, "_REQUIREDNAME"); |
405 | lua_getglobal(L, REQTAB); | 405 | lua_getglobal(L, REQTAB); |
406 | if (!lua_istable(L, 2)) return luaL_error(L, REQTAB " is not a table"); | 406 | if (!lua_istable(L, 2)) return luaL_error(L, "`" REQTAB "' is not a table"); |
407 | path = getpath(L); | 407 | path = getpath(L); |
408 | lua_pushvalue(L, 1); /* check package's name in book-keeping table */ | 408 | lua_pushvalue(L, 1); /* check package's name in book-keeping table */ |
409 | lua_rawget(L, 2); | 409 | lua_rawget(L, 2); |
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ldo.c,v 1.182 2002/06/18 17:42:52 roberto Exp roberto $ | 2 | ** $Id: ldo.c,v 1.183 2002/06/20 20:41:46 roberto Exp roberto $ |
3 | ** Stack and Call structure of Lua | 3 | ** Stack and Call structure of Lua |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -283,7 +283,7 @@ void luaD_call (lua_State *L, StkId func, int nResults) { | |||
283 | firstResult = luaV_execute(L); /* call it */ | 283 | firstResult = luaV_execute(L); /* call it */ |
284 | if (firstResult == NULL) { | 284 | if (firstResult == NULL) { |
285 | luaD_poscall(L, 0, L->top); | 285 | luaD_poscall(L, 0, L->top); |
286 | luaG_runerror(L, "attempt to `yield' across tag-method/C-call boundary"); | 286 | luaG_runerror(L, "attempt to yield across tag-method/C-call boundary"); |
287 | } | 287 | } |
288 | } | 288 | } |
289 | luaD_poscall(L, nResults, firstResult); | 289 | luaD_poscall(L, nResults, firstResult); |
@@ -357,7 +357,7 @@ LUA_API int lua_yield (lua_State *L, int nresults) { | |||
357 | lua_lock(L); | 357 | lua_lock(L); |
358 | ci = L->ci; | 358 | ci = L->ci; |
359 | if (ci_func(ci-1)->c.isC) | 359 | if (ci_func(ci-1)->c.isC) |
360 | luaG_runerror(L, "cannot `yield' a C function"); | 360 | luaG_runerror(L, "cannot yield a C function"); |
361 | ci->yield_results = nresults; | 361 | ci->yield_results = nresults; |
362 | lua_unlock(L); | 362 | lua_unlock(L); |
363 | return -1; | 363 | return -1; |
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: liolib.c,v 2.10 2002/06/06 18:17:33 roberto Exp roberto $ | 2 | ** $Id: liolib.c,v 2.11 2002/06/18 15:16:18 roberto Exp roberto $ |
3 | ** Standard I/O (and system) library | 3 | ** Standard I/O (and system) library |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -519,7 +519,7 @@ static int io_date (lua_State *L) { | |||
519 | if (strftime(b, sizeof(b), s, stm)) | 519 | if (strftime(b, sizeof(b), s, stm)) |
520 | lua_pushstring(L, b); | 520 | lua_pushstring(L, b); |
521 | else | 521 | else |
522 | return luaL_error(L, "invalid `date' format"); | 522 | return luaL_error(L, "`date' format too long"); |
523 | } | 523 | } |
524 | return 1; | 524 | return 1; |
525 | } | 525 | } |
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lparser.c,v 1.187 2002/06/06 13:52:37 roberto Exp roberto $ | 2 | ** $Id: lparser.c,v 1.188 2002/06/06 17:29:53 roberto Exp roberto $ |
3 | ** Lua Parser | 3 | ** Lua Parser |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -927,7 +927,7 @@ static void whilestat (LexState *ls, int line) { | |||
927 | fs->jpc = NO_JUMP; | 927 | fs->jpc = NO_JUMP; |
928 | sizeexp = fs->pc - expinit; /* size of expression code */ | 928 | sizeexp = fs->pc - expinit; /* size of expression code */ |
929 | if (sizeexp > MAXEXPWHILE) | 929 | if (sizeexp > MAXEXPWHILE) |
930 | luaX_syntaxerror(ls, "while condition too complex"); | 930 | luaX_syntaxerror(ls, "`while' condition too complex"); |
931 | for (i = 0; i < sizeexp; i++) /* save `exp' code */ | 931 | for (i = 0; i < sizeexp; i++) /* save `exp' code */ |
932 | codeexp[i] = fs->f->code[expinit + i]; | 932 | codeexp[i] = fs->f->code[expinit + i]; |
933 | fs->pc = expinit; /* remove `exp' code */ | 933 | fs->pc = expinit; /* remove `exp' code */ |