aboutsummaryrefslogtreecommitdiff
path: root/lbaselib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lbaselib.c')
-rw-r--r--lbaselib.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/lbaselib.c b/lbaselib.c
index 227d576c..d6168294 100644
--- a/lbaselib.c
+++ b/lbaselib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lbaselib.c,v 1.67 2002/04/12 19:57:29 roberto Exp roberto $ 2** $Id: lbaselib.c,v 1.68 2002/04/15 20:54:41 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*/
@@ -280,7 +280,7 @@ static int aux_unpack (lua_State *L, int arg) {
280 int n, i; 280 int n, i;
281 luaL_check_type(L, arg, LUA_TTABLE); 281 luaL_check_type(L, arg, LUA_TTABLE);
282 n = lua_getn(L, arg); 282 n = lua_getn(L, arg);
283 luaL_check_stack(L, n, "table too big to unpack"); 283 luaL_check_stack(L, n+LUA_MINSTACK, "table too big to unpack");
284 for (i=1; i<=n; i++) /* push arg[1...n] */ 284 for (i=1; i<=n; i++) /* push arg[1...n] */
285 lua_rawgeti(L, arg, i); 285 lua_rawgeti(L, arg, i);
286 return n; 286 return n;
@@ -299,10 +299,10 @@ static int luaB_call (lua_State *L) {
299 int status; 299 int status;
300 int n; 300 int n;
301 if (!lua_isnone(L, 4)) { /* set new error method */ 301 if (!lua_isnone(L, 4)) { /* set new error method */
302 lua_getglobal(L, LUA_ERRORMESSAGE); 302 lua_getglobal(L, "_ERRORMESSAGE");
303 err = lua_gettop(L); /* get index */ 303 err = lua_gettop(L); /* get index */
304 lua_pushvalue(L, 4); 304 lua_pushvalue(L, 4);
305 lua_setglobal(L, LUA_ERRORMESSAGE); 305 lua_setglobal(L, "_ERRORMESSAGE");
306 } 306 }
307 oldtop = lua_gettop(L); /* top before function-call preparation */ 307 oldtop = lua_gettop(L); /* top before function-call preparation */
308 /* push function */ 308 /* push function */
@@ -311,7 +311,7 @@ static int luaB_call (lua_State *L) {
311 status = lua_call(L, n, LUA_MULTRET); 311 status = lua_call(L, n, LUA_MULTRET);
312 if (err != 0) { /* restore old error method */ 312 if (err != 0) { /* restore old error method */
313 lua_pushvalue(L, err); 313 lua_pushvalue(L, err);
314 lua_setglobal(L, LUA_ERRORMESSAGE); 314 lua_setglobal(L, "_ERRORMESSAGE");
315 } 315 }
316 if (status != 0) { /* error in call? */ 316 if (status != 0) { /* error in call? */
317 if (strchr(options, 'x')) 317 if (strchr(options, 'x'))
@@ -460,7 +460,7 @@ static int luaB_require (lua_State *L) {
460 460
461static const luaL_reg base_funcs[] = { 461static const luaL_reg base_funcs[] = {
462 {LUA_ALERT, luaB__ALERT}, 462 {LUA_ALERT, luaB__ALERT},
463 {LUA_ERRORMESSAGE, luaB__ERRORMESSAGE}, 463 {"_ERRORMESSAGE", luaB__ERRORMESSAGE},
464 {"error", luaB_error}, 464 {"error", luaB_error},
465 {"metatable", luaB_metatable}, 465 {"metatable", luaB_metatable},
466 {"globals", luaB_globals}, 466 {"globals", luaB_globals},