diff options
author | Nicholas Clark <nick@ccl4.org> | 2010-12-27 08:58:19 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2010-12-27 08:58:19 +0000 |
commit | fc51b17cb579e8cdaf6e99fdeb80f92379491759 (patch) | |
tree | a38a6939058b6f486b2adb927391ba75e2f57ecb /pp.c | |
parent | 2f9970be002ee78a22fc687876139eedc9eb3a65 (diff) | |
download | perl-fc51b17cb579e8cdaf6e99fdeb80f92379491759.tar.gz |
Merge Perl_do_chop() and Perl_do_chomp().
They share code for dealing with PVAVs, PVHVs, read only values and handling
PL_encoding. They are not part of the public API, and Google codesearch shows
no users outside the core.
Diffstat (limited to 'pp.c')
-rw-r--r-- | pp.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -794,7 +794,7 @@ PP(pp_trans) PP(pp_schop) { dVAR; dSP; dTARGET; - do_chop(TARG, TOPs); + do_chomp(TARG, TOPs, FALSE); SETTARG; RETURN; } @@ -803,7 +803,7 @@ PP(pp_chop) { dVAR; dSP; dMARK; dTARGET; dORIGMARK; while (MARK < SP) - do_chop(TARG, *++MARK); + do_chomp(TARG, *++MARK, FALSE); SP = ORIGMARK; XPUSHTARG; RETURN; @@ -813,7 +813,7 @@ PP(pp_schomp) { dVAR; dSP; dTARGET; sv_setiv(TARG, 0); - do_chomp(TARG, TOPs); + do_chomp(TARG, TOPs, TRUE); SETs(TARG); RETURN; } @@ -824,7 +824,7 @@ PP(pp_chomp) sv_setiv(TARG, 0); while (MARK < SP) - do_chomp(TARG, *++MARK); + do_chomp(TARG, *++MARK, TRUE); SP = ORIGMARK; XPUSHTARG; RETURN; |