Skip to content

Commit

Permalink
Bodge to make Tk work - like the UTF8 flag, the READONLY flag has too
Browse files Browse the repository at this point in the history
many meanings. const const vs mutable in this case.

p4raw-id: //depot/perl@23085
  • Loading branch information
nwc10 committed Jul 12, 2004
1 parent 7a5fa8a commit d52b788
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion sv.c
Expand Up @@ -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)) {
Expand Down

0 comments on commit d52b788

Please sign in to comment.