summaryrefslogtreecommitdiff
path: root/pp.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2010-12-27 08:58:19 +0000
committerNicholas Clark <nick@ccl4.org>2010-12-27 08:58:19 +0000
commitfc51b17cb579e8cdaf6e99fdeb80f92379491759 (patch)
treea38a6939058b6f486b2adb927391ba75e2f57ecb /pp.c
parent2f9970be002ee78a22fc687876139eedc9eb3a65 (diff)
downloadperl-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.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/pp.c b/pp.c
index ef325a9e30..573672d54e 100644
--- a/pp.c
+++ b/pp.c
@@ -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;