… | |
… | |
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 |