summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorArtur Bergman <sky@nanisky.com>2003-02-06 09:39:24 +0000
committerArtur Bergman <sky@nanisky.com>2003-02-06 09:39:24 +0000
commita4bfb2902c7fff0a7b1981922fca3ac7c05b580a (patch)
tree36cb6abad718c26e4aee528c0b9fdf2c223f0fab /sv.c
parent315b3302253fddd0350dfb87e791a1cbf5584b20 (diff)
downloadperl-a4bfb2902c7fff0a7b1981922fca3ac7c05b580a.tar.gz
Patch from Richard Soderberg, cleanup the code a bit and comment
why we are not using SvOOK_on. p4raw-id: //depot/perl@18666
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sv.c b/sv.c
index 89792cf6b9..6eef6264cc 100644
--- a/sv.c
+++ b/sv.c
@@ -4417,9 +4417,12 @@ Perl_sv_chop(pTHX_ register SV *sv, register char *ptr)
*SvEND(sv) = '\0';
}
SvIVX(sv) = 0;
- SvFLAGS(sv) |= SVf_OOK;
+ /* Same SvOOK_on but SvOOK_on does a SvIOK_off
+ and we do that anyway inside the SvNIOK_off
+ */
+ SvFLAGS(sv) |= SVf_OOK;
}
- SvFLAGS(sv) &= ~(SVf_IOK|SVf_NOK|SVp_IOK|SVp_NOK|SVf_IVisUV);
+ SvNIOK_off(sv);
delta = ptr - SvPVX(sv);
SvLEN(sv) -= delta;
SvCUR(sv) -= delta;