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:
87d466f
)
Remove two pointless uses of sv_2mortal
author
Father Chrysostomos
<sprout@cpan.org>
Mon, 6 Jun 2011 03:09:13 +0000
(20:09 -0700)
committer
Father Chrysostomos
<sprout@cpan.org>
Mon, 6 Jun 2011 03:09:13 +0000
(20:09 -0700)
boolSV returns an immortal. When sv_2mortal is called on
an immortal, it simply returns. So eliminate the call.
universal.c
patch
|
blob
|
history
diff --git
a/universal.c
b/universal.c
index
a8113d0
..
35d1bcc
100644
(file)
--- a/
universal.c
+++ b/
universal.c
@@
-699,7
+699,6
@@
XS(XS_utf8_decode)
if (SvIsCOW(sv)) sv_force_normal(sv);
RETVAL = sv_utf8_decode(sv);
ST(0) = boolSV(RETVAL);
- sv_2mortal(ST(0));
}
XSRETURN(1);
}
@@
-733,7
+732,6
@@
XS(XS_utf8_downgrade)
const bool RETVAL = sv_utf8_downgrade(sv, failok);
ST(0) = boolSV(RETVAL);
- sv_2mortal(ST(0));
}
XSRETURN(1);
}