aboutsummaryrefslogtreecommitdiff
path: root/ldblib.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2010-12-20 15:24:15 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2010-12-20 15:24:15 -0200
commit8d579c5bc567ad92aadd59dbb8371bd961f42aa4 (patch)
treea2c496ef668e983b930d3ac63eeeb249c35ced49 /ldblib.c
parentd51743b0c77f7e6a12d06bb139b0a135eb0138dc (diff)
downloadlua-8d579c5bc567ad92aadd59dbb8371bd961f42aa4.tar.gz
lua-8d579c5bc567ad92aadd59dbb8371bd961f42aa4.tar.bz2
lua-8d579c5bc567ad92aadd59dbb8371bd961f42aa4.zip
'debug.setmetatable' returns object (like 'setmetatable')
Diffstat (limited to 'ldblib.c')
-rw-r--r--ldblib.c6
1 files 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 @@
1/* 1/*
2** $Id: ldblib.c,v 1.125 2010/11/10 18:06:10 roberto Exp roberto $ 2** $Id: ldblib.c,v 1.126 2010/11/16 18:01:28 roberto Exp roberto $
3** Interface from Lua to its debug API 3** Interface from Lua to its debug API
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -39,8 +39,8 @@ static int db_setmetatable (lua_State *L) {
39 luaL_argcheck(L, t == LUA_TNIL || t == LUA_TTABLE, 2, 39 luaL_argcheck(L, t == LUA_TNIL || t == LUA_TTABLE, 2,
40 "nil or table expected"); 40 "nil or table expected");
41 lua_settop(L, 2); 41 lua_settop(L, 2);
42 lua_pushboolean(L, lua_setmetatable(L, 1)); 42 lua_setmetatable(L, 1);
43 return 1; 43 return 1; /* return 1st argument */
44} 44}
45 45
46 46