Browse Source

renaming: 'lua_upvaladdr' -> 'lua_upvalueid',
'lua_upvaljoin' -> 'lua_upvaluejoin'

Roberto Ierusalimschy 15 years ago
parent
commit
7fe405739c
3 changed files with 14 additions and 14 deletions
  1. 3 3
      lapi.c
  2. 7 7
      ldblib.c
  3. 4 4
      lua.h

+ 3 - 3
lapi.c

@@ -1,5 +1,5 @@
 /*
-** $Id: lapi.c,v 2.98 2009/11/09 18:29:21 roberto Exp roberto $
+** $Id: lapi.c,v 2.99 2009/11/09 18:55:17 roberto Exp roberto $
 ** Lua API
 ** See Copyright Notice in lua.h
 */
@@ -1108,7 +1108,7 @@ static UpVal **getupvalref (lua_State *L, int fidx, int n, Closure **pf) {
 }
 
 
-LUA_API void *(lua_upvaladdr) (lua_State *L, int fidx, int n) {
+LUA_API void *(lua_upvalueid) (lua_State *L, int fidx, int n) {
   Closure *f;
   StkId fi = index2addr(L, fidx);
   api_check(L, ttisfunction(fi), "function expected");
@@ -1121,7 +1121,7 @@ LUA_API void *(lua_upvaladdr) (lua_State *L, int fidx, int n) {
 }
 
 
-LUA_API void (lua_upvaljoin) (lua_State *L, int fidx1, int n1,
+LUA_API void (lua_upvaluejoin) (lua_State *L, int fidx1, int n1,
                                             int fidx2, int n2) {
   Closure *f1;
   UpVal **up1 = getupvalref(L, fidx1, n1, &f1);

+ 7 - 7
ldblib.c

@@ -1,5 +1,5 @@
 /*
-** $Id: ldblib.c,v 1.113 2009/11/05 16:48:31 roberto Exp roberto $
+** $Id: ldblib.c,v 1.114 2009/11/05 17:26:00 roberto Exp roberto $
 ** Interface from Lua to its debug API
 ** See Copyright Notice in lua.h
 */
@@ -210,19 +210,19 @@ static int checkupval (lua_State *L, int argf, int argnup) {
 }
 
 
-static int db_upvaladdr (lua_State *L) {
+static int db_upvalueid (lua_State *L) {
   int n = checkupval(L, 1, 2);
-  lua_pushlightuserdata(L, lua_upvaladdr(L, 1, n));
+  lua_pushlightuserdata(L, lua_upvalueid(L, 1, n));
   return 1;
 }
 
 
-static int db_joinupval (lua_State *L) {
+static int db_joinupvalue (lua_State *L) {
   int n1 = checkupval(L, 1, 2);
   int n2 = checkupval(L, 3, 4);
   luaL_argcheck(L, !lua_iscfunction(L, 1), 1, "Lua function expected");
   luaL_argcheck(L, !lua_iscfunction(L, 3), 3, "Lua function expected");
-  lua_upvaljoin(L, 1, n1, 3, n2);
+  lua_upvaluejoin(L, 1, n1, 3, n2);
   return 0;
 }
 
@@ -365,8 +365,8 @@ static const luaL_Reg dblib[] = {
   {"getregistry", db_getregistry},
   {"getmetatable", db_getmetatable},
   {"getupvalue", db_getupvalue},
-  {"joinupval", db_joinupval},
-  {"upvaladdr", db_upvaladdr},
+  {"joinupvalue", db_joinupvalue},
+  {"upvalueid", db_upvalueid},
   {"setfenv", db_setfenv},
   {"sethook", db_sethook},
   {"setlocal", db_setlocal},

+ 4 - 4
lua.h

@@ -1,5 +1,5 @@
 /*
-** $Id: lua.h,v 1.248 2009/11/05 17:26:00 roberto Exp roberto $
+** $Id: lua.h,v 1.249 2009/11/09 18:55:17 roberto Exp roberto $
 ** Lua - A Scripting Language
 ** Lua.org, PUC-Rio, Brazil (http://www.lua.org)
 ** See Copyright Notice at the end of this file
@@ -381,9 +381,9 @@ LUA_API const char *(lua_setlocal) (lua_State *L, const lua_Debug *ar, int n);
 LUA_API const char *(lua_getupvalue) (lua_State *L, int funcindex, int n);
 LUA_API const char *(lua_setupvalue) (lua_State *L, int funcindex, int n);
 
-LUA_API void *(lua_upvaladdr) (lua_State *L, int fidx, int n);
-LUA_API void  (lua_upvaljoin) (lua_State *L, int fidx1, int n1,
-                                           int fidx2, int n2);
+LUA_API void *(lua_upvalueid) (lua_State *L, int fidx, int n);
+LUA_API void  (lua_upvaluejoin) (lua_State *L, int fidx1, int n1,
+                                               int fidx2, int n2);
 
 LUA_API int (lua_sethook) (lua_State *L, lua_Hook func, int mask, int count);
 LUA_API lua_Hook (lua_gethook) (lua_State *L);