Commit d4a4c3d5 authored by Tom Lane's avatar Tom Lane

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.
parent 242408db
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment