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.
dTHX;
JsonbValue key;
SV *val;
+ char *kstr;
+ I32 klen;
key.type = jbvString;
(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);
}