This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f0f40d8
)
The upgrade/croak order in Perl_sv_utf8_encode() seemed utterly
author
Nicholas Clark
<nick@ccl4.org>
Fri, 12 May 2006 14:08:45 +0000
(14:08 +0000)
committer
Nicholas Clark
<nick@ccl4.org>
Fri, 12 May 2006 14:08:45 +0000
(14:08 +0000)
backwards. It now checks for readonly *first*.
p4raw-id: //depot/perl@28178
sv.c
patch
|
blob
|
blame
|
history
diff --git
a/sv.c
b/sv.c
index
b014601
..
6c7071d
100644
(file)
--- a/
sv.c
+++ b/
sv.c
@@
-3100,13
+3100,13
@@
flag off so that it looks like octets again.
void
Perl_sv_utf8_encode(pTHX_ register SV *sv)
{
- (void) sv_utf8_upgrade(sv);
if (SvIsCOW(sv)) {
sv_force_normal_flags(sv, 0);
}
if (SvREADONLY(sv)) {
Perl_croak(aTHX_ PL_no_modify);
}
+ (void) sv_utf8_upgrade(sv);
SvUTF8_off(sv);
}