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

Comparing JSON-XS/XS.xs (file contents):
Revision 1.138 by root, Wed Mar 6 07:21:17 2019 UTC vs.
Revision 1.139 by root, Wed Mar 6 07:32:06 2019 UTC

826 826
827 encode_sv (enc, TOPs); 827 encode_sv (enc, TOPs);
828 SP -= count; 828 SP -= count;
829 } 829 }
830 830
831 PUTBACK;
832
831 encode_ch (enc, ']'); 833 encode_ch (enc, ']');
832 834
833 FREETMPS; LEAVE; 835 FREETMPS; LEAVE;
834 } 836 }
835 else if ((enc->json.flags & F_CONV_BLESSED) && (method = gv_fetchmethod_autoload (stash, "TO_JSON", 0))) 837 else if ((enc->json.flags & F_CONV_BLESSED) && (method = gv_fetchmethod_autoload (stash, "TO_JSON", 0)))
1533 PUTBACK; count = call_sv (HeVAL (cb), G_ARRAY); SPAGAIN; 1535 PUTBACK; count = call_sv (HeVAL (cb), G_ARRAY); SPAGAIN;
1534 1536
1535 if (count == 1) 1537 if (count == 1)
1536 { 1538 {
1537 sv = newSVsv (POPs); 1539 sv = newSVsv (POPs);
1540 PUTBACK;
1538 FREETMPS; LEAVE; 1541 FREETMPS; LEAVE;
1539 return sv; 1542 return sv;
1540 } 1543 }
1541 else if (count) 1544 else if (count)
1542 croak ("filter_json_single_key_object callbacks must not return more than one scalar"); 1545 croak ("filter_json_single_key_object callbacks must not return more than one scalar");
1543 1546
1547 PUTBACK;
1548
1544 SvREFCNT_inc (sv); 1549 SvREFCNT_inc (sv);
1550
1545 FREETMPS; LEAVE; 1551 FREETMPS; LEAVE;
1546 } 1552 }
1547 } 1553 }
1548 1554
1549 if (dec->json.cb_object) 1555 if (dec->json.cb_object)
1561 sv = newSVsv (POPs); 1567 sv = newSVsv (POPs);
1562 else if (count == 0) 1568 else if (count == 0)
1563 SvREFCNT_inc (sv); 1569 SvREFCNT_inc (sv);
1564 else 1570 else
1565 croak ("filter_json_object callbacks must not return more than one scalar"); 1571 croak ("filter_json_object callbacks must not return more than one scalar");
1572
1573 PUTBACK;
1566 1574
1567 FREETMPS; LEAVE; 1575 FREETMPS; LEAVE;
1568 } 1576 }
1569 } 1577 }
1570 1578

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines