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.126 by root, Sun Feb 21 16:18:19 2016 UTC vs.
Revision 1.127 by root, Fri Feb 26 21:46:45 2016 UTC

1696 1696
1697 /* work around bugs in 5.10 where manipulating magic values 1697 /* work around bugs in 5.10 where manipulating magic values
1698 * makes perl ignore the magic in subsequent accesses. 1698 * makes perl ignore the magic in subsequent accesses.
1699 * also make a copy of non-PV values, to get them into a clean 1699 * also make a copy of non-PV values, to get them into a clean
1700 * state (SvPV should do that, but it's buggy, see below). 1700 * state (SvPV should do that, but it's buggy, see below).
1701 *
1702 * SvIsCOW_shared_hash works around a bug in perl (possibly 5.16),
1703 * as reported by Reini Urban.
1701 */ 1704 */
1702 /*SvGETMAGIC (string);*/ 1705 /*SvGETMAGIC (string);*/
1703 if (SvMAGICAL (string) || !SvPOK (string)) 1706 if (SvMAGICAL (string) || !SvPOK (string) || SvIsCOW_shared_hash (string))
1704 string = sv_2mortal (newSVsv (string)); 1707 string = sv_2mortal (newSVsv (string));
1705 1708
1706 SvUPGRADE (string, SVt_PV); 1709 SvUPGRADE (string, SVt_PV);
1707 1710
1708 /* work around a bug in perl 5.10, which causes SvCUR to fail an 1711 /* work around a bug in perl 5.10, which causes SvCUR to fail an

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines