diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2023-08-17 15:59:28 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2023-08-17 15:59:28 -0300 |
commit | 9b4f39ab14fb2e55345c3d23537d129dac23b091 (patch) | |
tree | c7e11448e4d6eb1fec6e0a6d58544f17b1a39e10 /lobject.c | |
parent | f4211a5ea4e235ccfa8b8dfa46031c23e9e839e2 (diff) | |
download | lua-9b4f39ab14fb2e55345c3d23537d129dac23b091.tar.gz lua-9b4f39ab14fb2e55345c3d23537d129dac23b091.tar.bz2 lua-9b4f39ab14fb2e55345c3d23537d129dac23b091.zip |
More disciplined use of 'getstr' and 'tsslen'
We may want to add other string variants in the future; this change
documents better where the code may need to handle those variants.
Diffstat (limited to 'lobject.c')
-rw-r--r-- | lobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -542,7 +542,7 @@ const char *luaO_pushvfstring (lua_State *L, const char *fmt, va_list argp) { | |||
542 | addstr2buff(&buff, fmt, strlen(fmt)); /* rest of 'fmt' */ | 542 | addstr2buff(&buff, fmt, strlen(fmt)); /* rest of 'fmt' */ |
543 | clearbuff(&buff); /* empty buffer into the stack */ | 543 | clearbuff(&buff); /* empty buffer into the stack */ |
544 | lua_assert(buff.pushed == 1); | 544 | lua_assert(buff.pushed == 1); |
545 | return svalue(s2v(L->top.p - 1)); | 545 | return getstr(tsvalue(s2v(L->top.p - 1))); |
546 | } | 546 | } |
547 | 547 | ||
548 | 548 | ||