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.57 by root, Fri Nov 25 12:16:12 2016 UTC vs.
Revision 1.58 by root, Fri Nov 25 13:27:29 2016 UTC

1066 } 1066 }
1067 break; 1067 break;
1068 1068
1069 default: 1069 default:
1070 { 1070 {
1071 SV *tag_sv = newSVuv (tag);
1072
1071 sv = decode_sv (dec); 1073 sv = decode_sv (dec);
1072 1074
1073 dSP; 1075 dSP;
1074 ENTER; SAVETMPS; 1076 ENTER; SAVETMPS;
1075 SAVESTACK_POS (); 1077 SAVESTACK_POS ();
1076 PUSHMARK (SP); 1078 PUSHMARK (SP);
1077 EXTEND (SP, 2); 1079 EXTEND (SP, 2);
1078 PUSHs (newSVuv (tag)); 1080 PUSHs (tag_sv);
1079 PUSHs (sv); 1081 PUSHs (sv);
1080 1082
1081 PUTBACK; 1083 PUTBACK;
1082 int count = call_sv (dec->cbor.filter ? dec->cbor.filter : default_filter, G_ARRAY | G_EVAL); 1084 int count = call_sv (dec->cbor.filter ? dec->cbor.filter : default_filter, G_ARRAY | G_EVAL);
1083 SPAGAIN; 1085 SPAGAIN;
1084 1086
1085 if (SvTRUE (ERRSV)) 1087 if (SvTRUE (ERRSV))
1086 { 1088 {
1089 SvREFCNT_dec (tag_sv);
1087 FREETMPS; LEAVE; 1090 FREETMPS; LEAVE;
1088 ERR (SvPVutf8_nolen (sv_2mortal (SvREFCNT_inc (ERRSV)))); 1091 ERR (SvPVutf8_nolen (sv_2mortal (SvREFCNT_inc (ERRSV))));
1089 } 1092 }
1090 1093
1091 if (count) 1094 if (count)
1092 { 1095 {
1096 SvREFCNT_dec (tag_sv);
1093 SvREFCNT_dec (sv); 1097 SvREFCNT_dec (sv);
1094 sv = SvREFCNT_inc (POPs); 1098 sv = SvREFCNT_inc (POPs);
1095 } 1099 }
1096 else 1100 else
1097 { 1101 {
1098 AV *av = newAV (); 1102 AV *av = newAV ();
1099 av_push (av, newSVuv (tag)); 1103 av_push (av, tag_sv);
1100 av_push (av, sv); 1104 av_push (av, sv);
1101 1105
1102 HV *tagged_stash = !CBOR_SLOW || cbor_tagged_stash 1106 HV *tagged_stash = !CBOR_SLOW || cbor_tagged_stash
1103 ? cbor_tagged_stash 1107 ? cbor_tagged_stash
1104 : gv_stashpv ("CBOR::XS::Tagged" , 1); 1108 : gv_stashpv ("CBOR::XS::Tagged" , 1);
1233 1237
1234 if (dec.err) 1238 if (dec.err)
1235 { 1239 {
1236 if (dec.shareable) 1240 if (dec.shareable)
1237 { 1241 {
1238 // need to break cyclic links, which whould all be in shareable 1242 // need to break cyclic links, which would all be in shareable
1239 int i; 1243 int i;
1240 SV **svp; 1244 SV **svp;
1241 1245
1242 for (i = av_len (dec.shareable) + 1; i--; ) 1246 for (i = av_len (dec.shareable) + 1; i--; )
1243 if ((svp = av_fetch (dec.shareable, i, 0))) 1247 if ((svp = av_fetch (dec.shareable, i, 0)))

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines