aboutsummaryrefslogtreecommitdiff
path: root/lapi.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-01-13 13:56:03 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-01-13 13:56:03 -0200
commit46ec57cbc6dfe8df707be8f1fa52146988013feb (patch)
tree9d5a08bbcc0c515f80475f30f3a6e4f933df0dd4 /lapi.c
parent62787f1b1f9bb745afbf28b04241c9020a74b7a2 (diff)
downloadlua-46ec57cbc6dfe8df707be8f1fa52146988013feb.tar.gz
lua-46ec57cbc6dfe8df707be8f1fa52146988013feb.tar.bz2
lua-46ec57cbc6dfe8df707be8f1fa52146988013feb.zip
little change when calling tag methods
Diffstat (limited to 'lapi.c')
-rw-r--r--lapi.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/lapi.c b/lapi.c
index 8f67b3cd..72df1a2a 100644
--- a/lapi.c
+++ b/lapi.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lapi.c,v 1.66 1999/12/27 17:33:22 roberto Exp roberto $ 2** $Id: lapi.c,v 1.67 1999/12/30 18:27:03 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*/
@@ -157,6 +157,7 @@ lua_Object lua_rawgettable (lua_State *L) {
157 157
158void lua_settable (lua_State *L) { 158void lua_settable (lua_State *L) {
159 luaA_checkCparams(L, 3); 159 luaA_checkCparams(L, 3);
160 luaD_checkstack(L, 3); /* may need that to call a tag method */
160 luaV_settable(L, L->top-3); 161 luaV_settable(L, L->top-3);
161 L->top -= 2; /* pop table and index */ 162 L->top -= 2; /* pop table and index */
162} 163}
@@ -178,7 +179,7 @@ lua_Object lua_createtable (lua_State *L) {
178 179
179 180
180lua_Object lua_getglobal (lua_State *L, const char *name) { 181lua_Object lua_getglobal (lua_State *L, const char *name) {
181 luaD_checkstack(L, 2); /* may need that to call a tag method */ 182 luaD_checkstack(L, 3); /* may need that to call a tag method */
182 luaV_getglobal(L, luaS_assertglobalbyname(L, name)); 183 luaV_getglobal(L, luaS_assertglobalbyname(L, name));
183 return luaA_putObjectOnTop(L); 184 return luaA_putObjectOnTop(L);
184} 185}
@@ -192,7 +193,7 @@ lua_Object lua_rawgetglobal (lua_State *L, const char *name) {
192 193
193void lua_setglobal (lua_State *L, const char *name) { 194void lua_setglobal (lua_State *L, const char *name) {
194 luaA_checkCparams(L, 1); 195 luaA_checkCparams(L, 1);
195 luaD_checkstack(L, 2); /* may need that to call a tag method */ 196 luaD_checkstack(L, 3); /* may need that to call a tag method */
196 luaV_setglobal(L, luaS_assertglobalbyname(L, name)); 197 luaV_setglobal(L, luaS_assertglobalbyname(L, name));
197} 198}
198 199