Suppress compiler warning in new jsonb_plperl code.
Some compilers are evidently pickier than others about whether Perl's I32 typedef should be considered equivalent to int. Dodge the problem by using a separate variable; the prior coding was a bit confusing anyway. Per buildfarm. Note this does nothing to fix the test failures due to SV_to_JsonbValue not covering enough variable types.
This commit is contained in:
parent
242408dbef
commit
d4a4c3d5b4
@ -150,6 +150,8 @@ HV_to_JsonbValue(HV *obj, JsonbParseState **jsonb_state)
|
||||
dTHX;
|
||||
JsonbValue key;
|
||||
SV *val;
|
||||
char *kstr;
|
||||
I32 klen;
|
||||
|
||||
key.type = jbvString;
|
||||
|
||||
@ -157,9 +159,10 @@ HV_to_JsonbValue(HV *obj, JsonbParseState **jsonb_state)
|
||||
|
||||
(void) hv_iterinit(obj);
|
||||
|
||||
while ((val = hv_iternextsv(obj, &key.val.string.val, &key.val.string.len)))
|
||||
while ((val = hv_iternextsv(obj, &kstr, &klen)))
|
||||
{
|
||||
key.val.string.val = pnstrdup(key.val.string.val, key.val.string.len);
|
||||
key.val.string.val = pnstrdup(kstr, klen);
|
||||
key.val.string.len = klen;
|
||||
pushJsonbValue(jsonb_state, WJB_KEY, &key);
|
||||
(void) SV_to_JsonbValue(val, jsonb_state, false);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user