summaryrefslogtreecommitdiff
path: root/pp.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2010-12-27 08:22:21 +0000
committerNicholas Clark <nick@ccl4.org>2010-12-27 08:22:21 +0000
commit2f9970be002ee78a22fc687876139eedc9eb3a65 (patch)
tree675d2ea2057c047a2331d7dc73c254b27f1ab0c3 /pp.c
parent20cf1f79230fba6e0a6ba5053785e5fc841ee053 (diff)
downloadperl-2f9970be002ee78a22fc687876139eedc9eb3a65.tar.gz
Convert Perl_do_chomp() to the same prototype as Perl_do_chop().
Pass in an SV to hold the count, rather than returning the count.
Diffstat (limited to 'pp.c')
-rw-r--r--pp.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/pp.c b/pp.c
index 78b03eaeaf..ef325a9e30 100644
--- a/pp.c
+++ b/pp.c
@@ -812,17 +812,19 @@ PP(pp_chop)
PP(pp_schomp)
{
dVAR; dSP; dTARGET;
- SETi(do_chomp(TOPs));
+ sv_setiv(TARG, 0);
+ do_chomp(TARG, TOPs);
+ SETs(TARG);
RETURN;
}
PP(pp_chomp)
{
dVAR; dSP; dMARK; dTARGET; dORIGMARK;
- register I32 count = 0;
+ sv_setiv(TARG, 0);
while (MARK < SP)
- count += do_chomp(*++MARK);
+ do_chomp(TARG, *++MARK);
SP = ORIGMARK;
XPUSHTARG;
RETURN;