From d628795940cb00420829077869c0efe5678b4e18 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Tue, 31 May 2005 11:34:02 -0300 Subject: lua_objsize -> lua_objlen (more compatible with use of `lenĀ“ in other places [opcode name, metamethod index, etc.]) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lauxlib.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lauxlib.c') 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); -- cgit v1.2.3-55-g6feb