summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
authorGisle Aas <gisle@activestate.com>2006-01-04 14:23:20 +0000
committerGisle Aas <gisle@activestate.com>2006-01-04 14:23:20 +0000
commit91d456aef184ffc6173bca456cc087b98f0e0831 (patch)
tree2fbf008f7a3a22c63a42631a10a6e393b69bd18f /toke.c
parentae58ca13a14e22abe0ed3fb438d6da3c15c964b4 (diff)
downloadperl-91d456aef184ffc6173bca456cc087b98f0e0831.tar.gz
Add an extra NUL so that we can use sv_catpvs()
for "our @F=split..." and get rid of 15 and the explaination for why it's there. p4raw-id: //depot/perl@26648
Diffstat (limited to 'toke.c')
-rw-r--r--toke.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/toke.c b/toke.c
index c99f8af836..478ec7cdb8 100644
--- a/toke.c
+++ b/toke.c
@@ -2696,11 +2696,8 @@ Perl_yylex(pTHX)
else {
/* "q\0${splitstr}\0" is legal perl. Yes, even NUL
bytes can be used as quoting characters. :-) */
- /* The count here deliberately includes the NUL
- that terminates the C string constant. This
- embeds the opening NUL into the string. */
const char *splits = PL_splitstr;
- sv_catpvn(PL_linestr, "our @F=split(q", 15);
+ sv_catpvs(PL_linestr, "our @F=split(q\0");
do {
/* Need to \ \s */
if (*splits == '\\')