ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/CBOR-XS/XS.xs
(Generate patch)

Comparing CBOR-XS/XS.xs (file contents):
Revision 1.73 by root, Sat Oct 23 03:00:31 2021 UTC vs.
Revision 1.76 by root, Thu Sep 7 23:57:58 2023 UTC

1223 UV idx = decode_uint (dec); 1223 UV idx = decode_uint (dec);
1224 1224
1225 if (!dec->shareable || idx >= (UV)(1 + AvFILLp (dec->shareable))) 1225 if (!dec->shareable || idx >= (UV)(1 + AvFILLp (dec->shareable)))
1226 ERR ("corrupted CBOR data (sharedref index out of bounds)"); 1226 ERR ("corrupted CBOR data (sharedref index out of bounds)");
1227 1227
1228 sv = SvREFCNT_inc_NN (AvARRAY (dec->shareable)[idx]); 1228 sv = newSVsv (AvARRAY (dec->shareable)[idx]);
1229 1229
1230 if (sv == &PL_sv_undef) 1230 if (sv == &PL_sv_undef)
1231 ERR ("cyclic CBOR data structure found, but allow_cycles is not enabled"); 1231 ERR ("cyclic CBOR data structure found, but allow_cycles is not enabled");
1232 } 1232 }
1233 break; 1233 break;
1473 SvREFCNT_dec_NN (sv); 1473 SvREFCNT_dec_NN (sv);
1474 1474
1475 if (dec.err_sv) 1475 if (dec.err_sv)
1476 sv_2mortal (dec.err_sv); 1476 sv_2mortal (dec.err_sv);
1477 1477
1478 croak ("%s, at offset %d (octet 0x%02x)", dec.err, dec.cur - (U8 *)data, (int)(uint8_t)*dec.cur); 1478 croak ("%s, at offset %ld (octet 0x%02x)", dec.err, (long)(dec.cur - (U8 *)data), (int)(uint8_t)*dec.cur);
1479 } 1479 }
1480 1480
1481 sv = sv_2mortal (sv); 1481 sv = sv_2mortal (sv);
1482 1482
1483 return sv; 1483 return sv;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines