diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2024-03-18 15:56:32 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2024-03-18 15:56:32 -0300 |
| commit | ce6f5502c99ce9a367e25b678e375db6f8164d73 (patch) | |
| tree | 47f36dc2f6da96dfda325d7b587f3a20599e9317 /ldump.c | |
| parent | ba710603811c68fe3a69b3bb98e9038d37489a79 (diff) | |
| download | lua-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 'ldump.c')
| -rw-r--r-- | ldump.c | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -132,8 +132,8 @@ static void dumpString (DumpState *D, TString *ts) { | |||
| 132 | if (ts == NULL) | 132 | if (ts == NULL) |
| 133 | dumpSize(D, 0); | 133 | dumpSize(D, 0); |
| 134 | else { | 134 | else { |
| 135 | TValue idx; | 135 | TValue idx = luaH_getstr(D->h, ts); |
| 136 | if (luaH_getstr(D->h, ts, &idx) == HOK) { /* string already saved? */ | 136 | if (!isemptyV(idx)) { /* string already saved? */ |
| 137 | dumpSize(D, 1); /* reuse a saved string */ | 137 | dumpSize(D, 1); /* reuse a saved string */ |
| 138 | dumpSize(D, cast_sizet(ivalue(&idx))); /* index of saved string */ | 138 | dumpSize(D, cast_sizet(ivalue(&idx))); /* index of saved string */ |
| 139 | } | 139 | } |
