diff options
Diffstat (limited to 'ldblib.c')
-rw-r--r-- | ldblib.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ldblib.c,v 1.113 2009/11/05 16:48:31 roberto Exp roberto $ | 2 | ** $Id: ldblib.c,v 1.114 2009/11/05 17:26:00 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 | */ |
@@ -210,19 +210,19 @@ static int checkupval (lua_State *L, int argf, int argnup) { | |||
210 | } | 210 | } |
211 | 211 | ||
212 | 212 | ||
213 | static int db_upvaladdr (lua_State *L) { | 213 | static int db_upvalueid (lua_State *L) { |
214 | int n = checkupval(L, 1, 2); | 214 | int n = checkupval(L, 1, 2); |
215 | lua_pushlightuserdata(L, lua_upvaladdr(L, 1, n)); | 215 | lua_pushlightuserdata(L, lua_upvalueid(L, 1, n)); |
216 | return 1; | 216 | return 1; |
217 | } | 217 | } |
218 | 218 | ||
219 | 219 | ||
220 | static int db_joinupval (lua_State *L) { | 220 | static int db_joinupvalue (lua_State *L) { |
221 | int n1 = checkupval(L, 1, 2); | 221 | int n1 = checkupval(L, 1, 2); |
222 | int n2 = checkupval(L, 3, 4); | 222 | int n2 = checkupval(L, 3, 4); |
223 | luaL_argcheck(L, !lua_iscfunction(L, 1), 1, "Lua function expected"); | 223 | luaL_argcheck(L, !lua_iscfunction(L, 1), 1, "Lua function expected"); |
224 | luaL_argcheck(L, !lua_iscfunction(L, 3), 3, "Lua function expected"); | 224 | luaL_argcheck(L, !lua_iscfunction(L, 3), 3, "Lua function expected"); |
225 | lua_upvaljoin(L, 1, n1, 3, n2); | 225 | lua_upvaluejoin(L, 1, n1, 3, n2); |
226 | return 0; | 226 | return 0; |
227 | } | 227 | } |
228 | 228 | ||
@@ -365,8 +365,8 @@ static const luaL_Reg dblib[] = { | |||
365 | {"getregistry", db_getregistry}, | 365 | {"getregistry", db_getregistry}, |
366 | {"getmetatable", db_getmetatable}, | 366 | {"getmetatable", db_getmetatable}, |
367 | {"getupvalue", db_getupvalue}, | 367 | {"getupvalue", db_getupvalue}, |
368 | {"joinupval", db_joinupval}, | 368 | {"joinupvalue", db_joinupvalue}, |
369 | {"upvaladdr", db_upvaladdr}, | 369 | {"upvalueid", db_upvalueid}, |
370 | {"setfenv", db_setfenv}, | 370 | {"setfenv", db_setfenv}, |
371 | {"sethook", db_sethook}, | 371 | {"sethook", db_sethook}, |
372 | {"setlocal", db_setlocal}, | 372 | {"setlocal", db_setlocal}, |