From 8d579c5bc567ad92aadd59dbb8371bd961f42aa4 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 20 Dec 2010 15:24:15 -0200 Subject: 'debug.setmetatable' returns object (like 'setmetatable') --- ldblib.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ldblib.c b/ldblib.c index ca3f0c47..778a05ae 100644 --- a/ldblib.c +++ b/ldblib.c @@ -1,5 +1,5 @@ /* -** $Id: ldblib.c,v 1.125 2010/11/10 18:06:10 roberto Exp roberto $ +** $Id: ldblib.c,v 1.126 2010/11/16 18:01:28 roberto Exp roberto $ ** Interface from Lua to its debug API ** See Copyright Notice in lua.h */ @@ -39,8 +39,8 @@ static int db_setmetatable (lua_State *L) { luaL_argcheck(L, t == LUA_TNIL || t == LUA_TTABLE, 2, "nil or table expected"); lua_settop(L, 2); - lua_pushboolean(L, lua_setmetatable(L, 1)); - return 1; + lua_setmetatable(L, 1); + return 1; /* return 1st argument */ } -- cgit v1.2.3-55-g6feb