aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lbaselib.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/lbaselib.c b/lbaselib.c
index b32d07af..c27c7c01 100644
--- a/lbaselib.c
+++ b/lbaselib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lbaselib.c,v 1.11 2000/10/09 15:46:43 roberto Exp roberto $ 2** $Id: lbaselib.c,v 1.12 2000/10/20 16:39:03 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*/
@@ -179,7 +179,7 @@ static int luaB_rawset (lua_State *L) {
179} 179}
180 180
181static int luaB_settagmethod (lua_State *L) { 181static int luaB_settagmethod (lua_State *L) {
182 int tag = (int)luaL_check_int(L, 1); 182 int tag = luaL_check_int(L, 1);
183 const char *event = luaL_check_string(L, 2); 183 const char *event = luaL_check_string(L, 2);
184 luaL_arg_check(L, lua_isfunction(L, 3) || lua_isnil(L, 3), 3, 184 luaL_arg_check(L, lua_isfunction(L, 3) || lua_isnil(L, 3), 3,
185 "function or nil expected"); 185 "function or nil expected");
@@ -190,7 +190,11 @@ static int luaB_settagmethod (lua_State *L) {
190} 190}
191 191
192static int luaB_gettagmethod (lua_State *L) { 192static int luaB_gettagmethod (lua_State *L) {
193 lua_gettagmethod(L, luaL_check_int(L, 1), luaL_check_string(L, 2)); 193 int tag = luaL_check_int(L, 1);
194 const char *event = luaL_check_string(L, 2);
195 if (strcmp(event, "gc") == 0)
196 lua_error(L, "deprecated use: cannot get the `gc' tag method from Lua");
197 lua_gettagmethod(L, tag, event);
194 return 1; 198 return 1;
195} 199}
196 200