aboutsummaryrefslogtreecommitdiff
path: root/lapi.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2023-11-03 15:39:14 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2023-11-03 15:39:14 -0300
commitfa075b79530af1cbc977349f2e467d69ce01202c (patch)
tree300e10cd086a9812331b954d46552dbf420b0a8a /lapi.c
parent08a077d673b25cf1fbfe21794f240f4ff4999667 (diff)
parent7923dbbf72da303ca1cca17efd24725668992f15 (diff)
downloadlua-fa075b79530af1cbc977349f2e467d69ce01202c.tar.gz
lua-fa075b79530af1cbc977349f2e467d69ce01202c.tar.bz2
lua-fa075b79530af1cbc977349f2e467d69ce01202c.zip
Merge branch 'master' into newarray
Diffstat (limited to '')
-rw-r--r--lapi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lapi.c b/lapi.c
index 99c8473e..76c9d31b 100644
--- a/lapi.c
+++ b/lapi.c
@@ -417,9 +417,9 @@ LUA_API const char *lua_tolstring (lua_State *L, int idx, size_t *len) {
417 o = index2value(L, idx); /* previous call may reallocate the stack */ 417 o = index2value(L, idx); /* previous call may reallocate the stack */
418 } 418 }
419 if (len != NULL) 419 if (len != NULL)
420 *len = vslen(o); 420 *len = tsslen(tsvalue(o));
421 lua_unlock(L); 421 lua_unlock(L);
422 return svalue(o); 422 return getstr(tsvalue(o));
423} 423}
424 424
425 425