diff options
author | Nicholas Clark <nick@ccl4.org> | 2004-07-12 17:27:28 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2004-07-12 17:27:28 +0000 |
commit | d52b7888e9c3eb0ccb038b7c44075ba28e8fefa6 (patch) | |
tree | 98167a25b1563d2ec3b5a32b4c2c9ac54d35d591 /sv.c | |
parent | 7a5fa8a2cb05d06ee722842024d6960f349f483b (diff) | |
download | perl-d52b7888e9c3eb0ccb038b7c44075ba28e8fefa6.tar.gz |
Bodge to make Tk work - like the UTF8 flag, the READONLY flag has too
many meanings. const const vs mutable in this case.
p4raw-id: //depot/perl@23085
Diffstat (limited to 'sv.c')
-rw-r--r-- | sv.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -3941,7 +3941,13 @@ Perl_sv_utf8_upgrade_flags(pTHX_ register SV *sv, I32 flags) return 0; if (!SvPOK(sv)) { STRLEN len = 0; - (void) SvPV_force(sv,len); + if (SvREADONLY(sv) && (SvPOKp(sv) || SvIOKp(sv) || SvNOKp(sv))) { + (void) sv_2pv_flags(sv,&len, flags); + if (SvUTF8(sv)) + return len; + } else { + (void) SvPV_force(sv,len); + } } if (SvUTF8(sv)) { |