aboutsummaryrefslogtreecommitdiff
path: root/ldo.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-05-07 14:36:56 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-05-07 14:36:56 -0300
commitdea6b6da9422f34ad91c8f6ad9ad3ed650e95713 (patch)
tree3016b2fbcd67d75c71ee1b190aff2c24ada9b168 /ldo.c
parent71144e3ff0cb81bd9b8bb56d94dc76074c638c64 (diff)
downloadlua-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.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/ldo.c b/ldo.c
index 4dfb7d9e..87a78ed8 100644
--- a/ldo.c
+++ b/ldo.c
@@ -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 }