diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-05-31 11:34:02 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-05-31 11:34:02 -0300 |
| commit | d628795940cb00420829077869c0efe5678b4e18 (patch) | |
| tree | 882c6e993c7ffed27dcc142b2f15e88e95c5a073 /lauxlib.c | |
| parent | 05348d834b48a4b0720d0576c797877b98642e63 (diff) | |
| download | lua-d628795940cb00420829077869c0efe5678b4e18.tar.gz lua-d628795940cb00420829077869c0efe5678b4e18.tar.bz2 lua-d628795940cb00420829077869c0efe5678b4e18.zip | |
lua_objsize -> lua_objlen (more compatible with use of `len“ in other
places [opcode name, metamethod index, etc.])
Diffstat (limited to 'lauxlib.c')
| -rw-r--r-- | lauxlib.c | 6 |
1 files changed, 3 insertions, 3 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lauxlib.c,v 1.135 2005/05/31 14:25:18 roberto Exp roberto $ | 2 | ** $Id: lauxlib.c,v 1.136 2005/05/31 14:31:50 roberto Exp roberto $ |
| 3 | ** Auxiliary functions for building Lua libraries | 3 | ** Auxiliary functions for building Lua libraries |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -317,7 +317,7 @@ LUALIB_API int luaL_getn (lua_State *L, int t) { | |||
| 317 | if ((n = checkint(L, 2)) >= 0) return n; | 317 | if ((n = checkint(L, 2)) >= 0) return n; |
| 318 | lua_getfield(L, t, "n"); /* else try t.n */ | 318 | lua_getfield(L, t, "n"); /* else try t.n */ |
| 319 | if ((n = checkint(L, 1)) >= 0) return n; | 319 | if ((n = checkint(L, 1)) >= 0) return n; |
| 320 | return lua_objsize(L, t); | 320 | return lua_objlen(L, t); |
| 321 | } | 321 | } |
| 322 | 322 | ||
| 323 | #endif | 323 | #endif |
| @@ -542,7 +542,7 @@ LUALIB_API int luaL_ref (lua_State *L, int t) { | |||
| 542 | lua_rawseti(L, t, FREELIST_REF); /* (t[FREELIST_REF] = t[ref]) */ | 542 | lua_rawseti(L, t, FREELIST_REF); /* (t[FREELIST_REF] = t[ref]) */ |
| 543 | } | 543 | } |
| 544 | else { /* no free elements */ | 544 | else { /* no free elements */ |
| 545 | ref = lua_objsize(L, t); | 545 | ref = lua_objlen(L, t); |
| 546 | ref++; /* create new reference */ | 546 | ref++; /* create new reference */ |
| 547 | } | 547 | } |
| 548 | lua_rawseti(L, t, ref); | 548 | lua_rawseti(L, t, ref); |
