summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2009-10-20 08:11:07 +0100
committerNicholas Clark <nick@ccl4.org>2009-10-20 08:11:07 +0100
commit3e2f783e67807d5cec489704325d99148992cf37 (patch)
treeab25a59142575cb57bbed6261816fa8541e7db7b /toke.c
parent1c2c5f8e76ec81406f2cf2adeeadbd2a42dc5549 (diff)
downloadperl-3e2f783e67807d5cec489704325d99148992cf37.tar.gz
MAD-only code in S_swallow_bom() duplicated the actions of sv_setpvn()
Remove it. All its writes were byte-for-byte identical with the memory they overwrote. The bugs it attempts to fix are real, but caused by the design and implementation of other parts of this routine and S_utf16_textfilter().
Diffstat (limited to 'toke.c')
-rw-r--r--toke.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/toke.c b/toke.c
index c7ec476b6d..610cc24599 100644
--- a/toke.c
+++ b/toke.c
@@ -12714,18 +12714,9 @@ S_swallow_bom(pTHX_ U8 *s)
PL_bufend - (char*)s - 1,
&newlen);
sv_setpvn(PL_linestr, (const char*)news, newlen);
-#ifdef PERL_MAD
- s = (U8*)SvPVX(PL_linestr);
- Copy(news, s, newlen, U8);
- s[newlen] = '\0';
-#endif
Safefree(news);
SvUTF8_on(PL_linestr);
s = (U8*)SvPVX(PL_linestr);
-#ifdef PERL_MAD
- /* FIXME - is this a general bug fix? */
- s[newlen] = '\0';
-#endif
PL_bufend = SvPVX(PL_linestr) + newlen;
}
#else