… | |
… | |
1243 | // registerr it in the AV for later fixing |
1243 | // registerr it in the AV for later fixing |
1244 | if (SvTYPE (sv) == SVt_PVAV) |
1244 | if (SvTYPE (sv) == SVt_PVAV) |
1245 | { |
1245 | { |
1246 | AV *av = (AV *)sv; |
1246 | AV *av = (AV *)sv; |
1247 | sv = newRV_noinc (&PL_sv_undef); |
1247 | sv = newRV_noinc (&PL_sv_undef); |
1248 | av_push (av, sv); |
1248 | av_push (av, SvREFCNT_inc_NN (sv)); |
1249 | } |
1249 | } |
1250 | else if (sv == &PL_sv_undef) // not yet decoded, but cycles not allowed |
1250 | else if (sv == &PL_sv_undef) // not yet decoded, but cycles not allowed |
1251 | ERR ("cyclic CBOR data structure found, but allow_cycles is not enabled"); |
1251 | ERR ("cyclic CBOR data structure found, but allow_cycles is not enabled"); |
1252 | else // we decoded the object earlier, no cycle |
1252 | else // we decoded the object earlier, no cycle |
1253 | sv = newSVsv (sv); |
1253 | sv = newSVsv (sv); |