diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2010-12-20 15:24:15 -0200 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2010-12-20 15:24:15 -0200 |
| commit | 8d579c5bc567ad92aadd59dbb8371bd961f42aa4 (patch) | |
| tree | a2c496ef668e983b930d3ac63eeeb249c35ced49 | |
| parent | d51743b0c77f7e6a12d06bb139b0a135eb0138dc (diff) | |
| download | lua-8d579c5bc567ad92aadd59dbb8371bd961f42aa4.tar.gz lua-8d579c5bc567ad92aadd59dbb8371bd961f42aa4.tar.bz2 lua-8d579c5bc567ad92aadd59dbb8371bd961f42aa4.zip | |
'debug.setmetatable' returns object (like 'setmetatable')
| -rw-r--r-- | ldblib.c | 6 |
1 files changed, 3 insertions, 3 deletions
| @@ -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 | ||
