aboutsummaryrefslogtreecommitdiff
path: root/ldblib.c
diff options
context:
space:
mode:
Diffstat (limited to 'ldblib.c')
-rw-r--r--ldblib.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/ldblib.c b/ldblib.c
index 6afc1fc1..3a773080 100644
--- a/ldblib.c
+++ b/ldblib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ldblib.c,v 1.122 2010/06/21 16:30:12 roberto Exp roberto $ 2** $Id: ldblib.c,v 1.123 2010/07/02 11:38:13 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*/
@@ -44,19 +44,19 @@ static int db_setmetatable (lua_State *L) {
44} 44}
45 45
46 46
47static int db_getenv (lua_State *L) { 47static int db_getuservalue (lua_State *L) {
48 luaL_checktype(L, 1, LUA_TUSERDATA); 48 luaL_checktype(L, 1, LUA_TUSERDATA);
49 lua_getenv(L, 1); 49 lua_getuservalue(L, 1);
50 return 1; 50 return 1;
51} 51}
52 52
53 53
54static int db_setenv (lua_State *L) { 54static int db_setuservalue (lua_State *L) {
55 luaL_checktype(L, 1, LUA_TUSERDATA); 55 luaL_checktype(L, 1, LUA_TUSERDATA);
56 if (!lua_isnoneornil(L, 2)) 56 if (!lua_isnoneornil(L, 2))
57 luaL_checktype(L, 2, LUA_TTABLE); 57 luaL_checktype(L, 2, LUA_TTABLE);
58 lua_settop(L, 2); 58 lua_settop(L, 2);
59 lua_setenv(L, 1); 59 lua_setuservalue(L, 1);
60 return 1; 60 return 1;
61} 61}
62 62
@@ -375,7 +375,7 @@ static int db_traceback (lua_State *L) {
375 375
376static const luaL_Reg dblib[] = { 376static const luaL_Reg dblib[] = {
377 {"debug", db_debug}, 377 {"debug", db_debug},
378 {"getenv", db_getenv}, 378 {"getuservalue", db_getuservalue},
379 {"gethook", db_gethook}, 379 {"gethook", db_gethook},
380 {"getinfo", db_getinfo}, 380 {"getinfo", db_getinfo},
381 {"getlocal", db_getlocal}, 381 {"getlocal", db_getlocal},
@@ -384,7 +384,7 @@ static const luaL_Reg dblib[] = {
384 {"getupvalue", db_getupvalue}, 384 {"getupvalue", db_getupvalue},
385 {"upvaluejoin", db_upvaluejoin}, 385 {"upvaluejoin", db_upvaluejoin},
386 {"upvalueid", db_upvalueid}, 386 {"upvalueid", db_upvalueid},
387 {"setenv", db_setenv}, 387 {"setuservalue", db_setuservalue},
388 {"sethook", db_sethook}, 388 {"sethook", db_sethook},
389 {"setlocal", db_setlocal}, 389 {"setlocal", db_setlocal},
390 {"setmetatable", db_setmetatable}, 390 {"setmetatable", db_setmetatable},