From 46ec57cbc6dfe8df707be8f1fa52146988013feb Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Thu, 13 Jan 2000 13:56:03 -0200 Subject: little change when calling tag methods --- lapi.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lapi.c') diff --git a/lapi.c b/lapi.c index 8f67b3cd..72df1a2a 100644 --- a/lapi.c +++ b/lapi.c @@ -1,5 +1,5 @@ /* -** $Id: lapi.c,v 1.66 1999/12/27 17:33:22 roberto Exp roberto $ +** $Id: lapi.c,v 1.67 1999/12/30 18:27:03 roberto Exp roberto $ ** Lua API ** See Copyright Notice in lua.h */ @@ -157,6 +157,7 @@ lua_Object lua_rawgettable (lua_State *L) { void lua_settable (lua_State *L) { luaA_checkCparams(L, 3); + luaD_checkstack(L, 3); /* may need that to call a tag method */ luaV_settable(L, L->top-3); L->top -= 2; /* pop table and index */ } @@ -178,7 +179,7 @@ lua_Object lua_createtable (lua_State *L) { lua_Object lua_getglobal (lua_State *L, const char *name) { - luaD_checkstack(L, 2); /* may need that to call a tag method */ + luaD_checkstack(L, 3); /* may need that to call a tag method */ luaV_getglobal(L, luaS_assertglobalbyname(L, name)); return luaA_putObjectOnTop(L); } @@ -192,7 +193,7 @@ lua_Object lua_rawgetglobal (lua_State *L, const char *name) { void lua_setglobal (lua_State *L, const char *name) { luaA_checkCparams(L, 1); - luaD_checkstack(L, 2); /* may need that to call a tag method */ + luaD_checkstack(L, 3); /* may need that to call a tag method */ luaV_setglobal(L, luaS_assertglobalbyname(L, name)); } -- cgit v1.2.3-55-g6feb