From ce6f5502c99ce9a367e25b678e375db6f8164d73 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 18 Mar 2024 15:56:32 -0300 Subject: '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.) --- ldump.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ldump.c') diff --git a/ldump.c b/ldump.c index 0d20fb0a..34b63a8a 100644 --- a/ldump.c +++ b/ldump.c @@ -132,8 +132,8 @@ static void dumpString (DumpState *D, TString *ts) { if (ts == NULL) dumpSize(D, 0); else { - TValue idx; - if (luaH_getstr(D->h, ts, &idx) == HOK) { /* string already saved? */ + TValue idx = luaH_getstr(D->h, ts); + if (!isemptyV(idx)) { /* string already saved? */ dumpSize(D, 1); /* reuse a saved string */ dumpSize(D, cast_sizet(ivalue(&idx))); /* index of saved string */ } -- cgit v1.2.3-55-g6feb