aboutsummaryrefslogtreecommitdiff
path: root/lundump.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2023-08-17 15:59:28 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2023-08-17 15:59:28 -0300
commit9b4f39ab14fb2e55345c3d23537d129dac23b091 (patch)
treec7e11448e4d6eb1fec6e0a6d58544f17b1a39e10 /lundump.c
parentf4211a5ea4e235ccfa8b8dfa46031c23e9e839e2 (diff)
downloadlua-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 'lundump.c')
-rw-r--r--lundump.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lundump.c b/lundump.c
index 02aed64f..f1852c35 100644
--- a/lundump.c
+++ b/lundump.c
@@ -122,7 +122,7 @@ static TString *loadStringN (LoadState *S, Proto *p) {
122 ts = luaS_createlngstrobj(L, size); /* create string */ 122 ts = luaS_createlngstrobj(L, size); /* create string */
123 setsvalue2s(L, L->top.p, ts); /* anchor it ('loadVector' can GC) */ 123 setsvalue2s(L, L->top.p, ts); /* anchor it ('loadVector' can GC) */
124 luaD_inctop(L); 124 luaD_inctop(L);
125 loadVector(S, getstr(ts), size); /* load directly in final place */ 125 loadVector(S, getlngstr(ts), size); /* load directly in final place */
126 L->top.p--; /* pop string */ 126 L->top.p--; /* pop string */
127 } 127 }
128 luaC_objbarrier(L, p, ts); 128 luaC_objbarrier(L, p, ts);