projects
/
platform
/
upstream
/
perl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
18984c1
)
sv.c:sv_utf8_encode: simplify code
author
Father Chrysostomos
<sprout@cpan.org>
Mon, 23 Jan 2012 06:58:58 +0000
(22:58 -0800)
committer
Father Chrysostomos
<sprout@cpan.org>
Mon, 23 Jan 2012 18:19:36 +0000
(10:19 -0800)
sv_force_normal already croaks for read-only variables
sv.c
patch
|
blob
|
history
diff --git
a/sv.c
b/sv.c
index
3094274
..
c1ece77
100644
(file)
--- a/
sv.c
+++ b/
sv.c
@@
-3521,11
+3521,8
@@
Perl_sv_utf8_encode(pTHX_ register SV *const sv)
{
PERL_ARGS_ASSERT_SV_UTF8_ENCODE;
- if (SvIsCOW(sv)) {
- sv_force_normal_flags(sv, 0);
- }
if (SvREADONLY(sv)) {
-
Perl_croak_no_modify(aTHX
);
+
sv_force_normal_flags(sv, 0
);
}
(void) sv_utf8_upgrade(sv);
SvUTF8_off(sv);