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 /lundump.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 'lundump.c')
-rw-r--r-- | lundump.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); |