summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lapi.c4
-rw-r--r--lauxlib.c6
-rw-r--r--lauxlib.h4
-rw-r--r--ltests.c4
-rw-r--r--lua.h6
5 files changed, 12 insertions, 12 deletions
diff --git a/lapi.c b/lapi.c
index 61d0b316..60fcf0c6 100644
--- a/lapi.c
+++ b/lapi.c
@@ -1,5 +1,5 @@
/*
-** $Id: lapi.c,v 2.41 2005/05/17 19:49:15 roberto Exp roberto $
+** $Id: lapi.c,v 2.42 2005/05/31 14:25:18 roberto Exp roberto $
** Lua API
** See Copyright Notice in lua.h
*/
@@ -351,7 +351,7 @@ LUA_API const char *lua_tolstring (lua_State *L, int idx, size_t *len) {
}
-LUA_API size_t lua_objsize (lua_State *L, int idx) {
+LUA_API size_t lua_objlen (lua_State *L, int idx) {
StkId o = index2adr(L, idx);
switch (ttype(o)) {
case LUA_TSTRING: return tsvalue(o)->len;
diff --git a/lauxlib.c b/lauxlib.c
index 3db11285..87d58ccc 100644
--- a/lauxlib.c
+++ b/lauxlib.c
@@ -1,5 +1,5 @@
/*
-** $Id: lauxlib.c,v 1.135 2005/05/31 14:25:18 roberto Exp roberto $
+** $Id: lauxlib.c,v 1.136 2005/05/31 14:31:50 roberto Exp roberto $
** Auxiliary functions for building Lua libraries
** See Copyright Notice in lua.h
*/
@@ -317,7 +317,7 @@ LUALIB_API int luaL_getn (lua_State *L, int t) {
if ((n = checkint(L, 2)) >= 0) return n;
lua_getfield(L, t, "n"); /* else try t.n */
if ((n = checkint(L, 1)) >= 0) return n;
- return lua_objsize(L, t);
+ return lua_objlen(L, t);
}
#endif
@@ -542,7 +542,7 @@ LUALIB_API int luaL_ref (lua_State *L, int t) {
lua_rawseti(L, t, FREELIST_REF); /* (t[FREELIST_REF] = t[ref]) */
}
else { /* no free elements */
- ref = lua_objsize(L, t);
+ ref = lua_objlen(L, t);
ref++; /* create new reference */
}
lua_rawseti(L, t, ref);
diff --git a/lauxlib.h b/lauxlib.h
index 504fac97..e6a6dca3 100644
--- a/lauxlib.h
+++ b/lauxlib.h
@@ -1,5 +1,5 @@
/*
-** $Id: lauxlib.h,v 1.77 2005/05/25 13:21:26 roberto Exp roberto $
+** $Id: lauxlib.h,v 1.78 2005/05/31 14:25:18 roberto Exp roberto $
** Auxiliary functions for building Lua libraries
** See Copyright Notice in lua.h
*/
@@ -16,7 +16,7 @@
#if !defined(LUA_COMPAT_GETN)
-#define luaL_getn(L,i) ((int)lua_objsize(L, i))
+#define luaL_getn(L,i) ((int)lua_objlen(L, i))
#define luaL_setn(L,i,j) ((void)0) /* no op! */
#endif
diff --git a/ltests.c b/ltests.c
index 9e7feda2..4ed78f25 100644
--- a/ltests.c
+++ b/ltests.c
@@ -1,5 +1,5 @@
/*
-** $Id: ltests.c,v 2.23 2005/03/28 17:17:53 roberto Exp roberto $
+** $Id: ltests.c,v 2.24 2005/05/03 19:01:17 roberto Exp roberto $
** Internal Module for Debugging of the Lua Implementation
** See Copyright Notice in lua.h
*/
@@ -882,7 +882,7 @@ static int testC (lua_State *L) {
lua_pushstring(L1, s);
}
else if EQ("objsize") {
- lua_pushinteger(L1, lua_objsize(L1, getindex));
+ lua_pushinteger(L1, lua_objlen(L1, getindex));
}
else if EQ("tocfunction") {
lua_pushcfunction(L1, lua_tocfunction(L1, getindex));
diff --git a/lua.h b/lua.h
index 894c2e0a..edff2286 100644
--- a/lua.h
+++ b/lua.h
@@ -1,5 +1,5 @@
/*
-** $Id: lua.h,v 1.207 2005/05/16 19:21:11 roberto Exp roberto $
+** $Id: lua.h,v 1.208 2005/05/17 19:49:15 roberto Exp roberto $
** Lua - An Extensible Extension Language
** Tecgraf: Computer Graphics Technology Group, PUC-Rio, Brazil
** http://www.lua.org
@@ -147,7 +147,7 @@ LUA_API lua_Number (lua_tonumber) (lua_State *L, int idx);
LUA_API lua_Integer (lua_tointeger) (lua_State *L, int idx);
LUA_API int (lua_toboolean) (lua_State *L, int idx);
LUA_API const char *(lua_tolstring) (lua_State *L, int idx, size_t *len);
-LUA_API size_t (lua_objsize) (lua_State *L, int idx);
+LUA_API size_t (lua_objlen) (lua_State *L, int idx);
LUA_API lua_CFunction (lua_tocfunction) (lua_State *L, int idx);
LUA_API void *(lua_touserdata) (lua_State *L, int idx);
LUA_API lua_State *(lua_tothread) (lua_State *L, int idx);
@@ -257,7 +257,7 @@ LUA_API lua_Alloc (lua_getallocf) (lua_State *L, void **ud);
#define lua_pushcfunction(L,f) lua_pushcclosure(L, (f), 0)
-#define lua_strlen(L,i) lua_objsize(L, (i))
+#define lua_strlen(L,i) lua_objlen(L, (i))
#define lua_isfunction(L,n) (lua_type(L, (n)) == LUA_TFUNCTION)
#define lua_istable(L,n) (lua_type(L, (n)) == LUA_TTABLE)