diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2006-09-18 11:03:18 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2006-09-18 11:03:18 -0300 |
| commit | d22526ec30c32f7ed422d2cd63d4b5c426769597 (patch) | |
| tree | f49002e0365ec2e33b18abaad9c853af2eee05b9 /lauxlib.c | |
| parent | bd869c7b3147c277a974c896a5e3a013979ac64e (diff) | |
| download | lua-d22526ec30c32f7ed422d2cd63d4b5c426769597.tar.gz lua-d22526ec30c32f7ed422d2cd63d4b5c426769597.tar.bz2 lua-d22526ec30c32f7ed422d2cd63d4b5c426769597.zip | |
'lua_strlen' is for compatibility only
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.159 2006/03/21 19:31:09 roberto Exp roberto $ | 2 | ** $Id: lauxlib.c,v 1.160 2006/06/22 16:12:59 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 | */ |
| @@ -411,9 +411,9 @@ static void adjuststack (luaL_Buffer *B) { | |||
| 411 | if (B->lvl > 1) { | 411 | if (B->lvl > 1) { |
| 412 | lua_State *L = B->L; | 412 | lua_State *L = B->L; |
| 413 | int toget = 1; /* number of levels to concat */ | 413 | int toget = 1; /* number of levels to concat */ |
| 414 | size_t toplen = lua_strlen(L, -1); | 414 | size_t toplen = lua_objlen(L, -1); |
| 415 | do { | 415 | do { |
| 416 | size_t l = lua_strlen(L, -(toget+1)); | 416 | size_t l = lua_objlen(L, -(toget+1)); |
| 417 | if (B->lvl - toget + 1 >= LIMIT || toplen > l) { | 417 | if (B->lvl - toget + 1 >= LIMIT || toplen > l) { |
| 418 | toplen += l; | 418 | toplen += l; |
| 419 | toget++; | 419 | toget++; |
