diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-05-07 14:36:56 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-05-07 14:36:56 -0300 |
commit | dea6b6da9422f34ad91c8f6ad9ad3ed650e95713 (patch) | |
tree | 3016b2fbcd67d75c71ee1b190aff2c24ada9b168 /ldo.c | |
parent | 71144e3ff0cb81bd9b8bb56d94dc76074c638c64 (diff) | |
download | lua-dea6b6da9422f34ad91c8f6ad9ad3ed650e95713.tar.gz lua-dea6b6da9422f34ad91c8f6ad9ad3ed650e95713.tar.bz2 lua-dea6b6da9422f34ad91c8f6ad9ad3ed650e95713.zip |
new function `lua_vpushstr' to replace uses of `sprintf'
Diffstat (limited to 'ldo.c')
-rw-r--r-- | ldo.c | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ldo.c,v 1.172 2002/04/22 14:40:50 roberto Exp roberto $ | 2 | ** $Id: ldo.c,v 1.173 2002/05/01 20:40:42 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 | */ |
@@ -436,8 +436,7 @@ int luaD_protectedparser (lua_State *L, ZIO *z, int bin) { | |||
436 | } | 436 | } |
437 | else { | 437 | else { |
438 | setobj(L->top++, &p.err); | 438 | setobj(L->top++, &p.err); |
439 | if (status == LUA_ERRRUN) /* an error occurred: correct error code */ | 439 | lua_assert(status != LUA_ERRRUN); |
440 | status = LUA_ERRSYNTAX; | ||
441 | } | 440 | } |
442 | lua_unlock(L); | 441 | lua_unlock(L); |
443 | return status; | 442 | return status; |
@@ -459,9 +458,8 @@ static void message (lua_State *L, const TObject *msg, int nofunc) { | |||
459 | } | 458 | } |
460 | else { /* call error function */ | 459 | else { /* call error function */ |
461 | setobj(L->top, m); | 460 | setobj(L->top, m); |
462 | incr_top(L); | 461 | setobj(L->top + 1, msg); |
463 | setobj(L->top, msg); | 462 | L->top += 2; |
464 | incr_top(L); | ||
465 | luaD_call(L, L->top - 2, 1); | 463 | luaD_call(L, L->top - 2, 1); |
466 | setobj(m, L->top - 1); | 464 | setobj(m, L->top - 1); |
467 | } | 465 | } |