Add an extra NUL so that we can use sv_catpvs()
Gisle Aas [Wed, 4 Jan 2006 14:23:20 +0000 (14:23 +0000)]
for "our @F=split..." and get rid of 15 and the
explaination for why it's there.

p4raw-id: //depot/perl@26648

toke.c

diff --git a/toke.c b/toke.c
index c99f8af..478ec7c 100644 (file)
--- 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 == '\\')