'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.)
This commit is contained in:
4
ldump.c
4
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 */
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user