… | |
… | |
1410 | { |
1410 | { |
1411 | dec_t dec; |
1411 | dec_t dec; |
1412 | STRLEN offset; |
1412 | STRLEN offset; |
1413 | SV *sv; |
1413 | SV *sv; |
1414 | |
1414 | |
|
|
1415 | /* work around bugs in 5.10 where manipulating magic values |
|
|
1416 | * will perl ignore the magic in subsequent accesses |
|
|
1417 | */ |
1415 | SvGETMAGIC (string); |
1418 | /*SvGETMAGIC (string);*/ |
|
|
1419 | if (SvMAGICAL (string)) |
|
|
1420 | string = sv_2mortal (newSVsv (string)); |
|
|
1421 | |
1416 | SvUPGRADE (string, SVt_PV); |
1422 | SvUPGRADE (string, SVt_PV); |
1417 | |
1423 | |
1418 | /* work around a bug in perl 5.10, which causes SvCUR to fail an |
1424 | /* work around a bug in perl 5.10, which causes SvCUR to fail an |
1419 | * assertion with -DDEBUGGING, although SvCUR is documented to |
1425 | * assertion with -DDEBUGGING, although SvCUR is documented to |
1420 | * return the xpv_cur field which certainly exists after upgrading. |
1426 | * return the xpv_cur field which certainly exists after upgrading. |