diff options
author | Nicholas Clark <nick@ccl4.org> | 2010-12-27 08:22:21 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2010-12-27 08:22:21 +0000 |
commit | 2f9970be002ee78a22fc687876139eedc9eb3a65 (patch) | |
tree | 675d2ea2057c047a2331d7dc73c254b27f1ab0c3 /pp.c | |
parent | 20cf1f79230fba6e0a6ba5053785e5fc841ee053 (diff) | |
download | perl-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.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -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; |