aboutsummaryrefslogtreecommitdiff
path: root/lundump.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2024-03-18 15:56:32 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2024-03-18 15:56:32 -0300
commitce6f5502c99ce9a367e25b678e375db6f8164d73 (patch)
tree47f36dc2f6da96dfda325d7b587f3a20599e9317 /lundump.c
parentba710603811c68fe3a69b3bb98e9038d37489a79 (diff)
downloadlua-ce6f5502c99ce9a367e25b678e375db6f8164d73.tar.gz
lua-ce6f5502c99ce9a367e25b678e375db6f8164d73.tar.bz2
lua-ce6f5502c99ce9a367e25b678e375db6f8164d73.zip
'luaH_get' functions return 'TValue'
Instead of receiving a parameter telling them where to put the result of the query, these functions return the TValue directly. (That is, they return a structure.)
Diffstat (limited to 'lundump.c')
-rw-r--r--lundump.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lundump.c b/lundump.c
index 51d5dc66..593a4951 100644
--- a/lundump.c
+++ b/lundump.c
@@ -149,8 +149,7 @@ static void loadString (LoadState *S, Proto *p, TString **sl) {
149 } 149 }
150 else if (size == 1) { /* previously saved string? */ 150 else if (size == 1) { /* previously saved string? */
151 lua_Integer idx = cast(lua_Integer, loadSize(S)); /* get its index */ 151 lua_Integer idx = cast(lua_Integer, loadSize(S)); /* get its index */
152 TValue stv; 152 TValue stv = luaH_getint(S->h, idx); /* get its value */
153 luaH_getint(S->h, idx, &stv); /* get its value */
154 *sl = ts = tsvalue(&stv); 153 *sl = ts = tsvalue(&stv);
155 luaC_objbarrier(L, p, ts); 154 luaC_objbarrier(L, p, ts);
156 return; /* do not save it again */ 155 return; /* do not save it again */