diff options
author | Brian Fraser <fraserbn@gmail.com> | 2013-09-01 19:32:17 -0300 |
---|---|---|
committer | Brian Fraser <fraserbn@gmail.com> | 2013-09-18 05:24:43 -0300 |
commit | b5248d1e210c2a723adae8e9b7f5d17076647431 (patch) | |
tree | b3b51745c4547b0dea0ccd99cf98d31b3c918f88 /proto.h | |
parent | b29f65fce68bc99d0924f63f8d8bbbe70dc63890 (diff) | |
download | perl-b5248d1e210c2a723adae8e9b7f5d17076647431.tar.gz |
toke.c, S_scan_ident(): Don't take a "end of buffer" argument, use PL_bufend
All but one of scan_ident()'s callers already passed PL_bufend as
the removed argument; The one deviant was intuit_more(), which was
setting the "end of buffer" argument, to the next close-bracket.
This commit modifies intuit_more() to temporarily set PL_bufend and
then restore it.
This was done as groundwork for the following commit, which will add
more uses of PEEKSPACE() to scan_ident() in order to fix some whitespace
and line number bugs, and PEEKSPACE() modifies PL_bufend directly
if it encounters a newline at the end of the buffer -- that last bit
being why changing intuit_more() to modify-and-restore PL_bufend is
safe, since the end of the buffer will always be a ']'
Diffstat (limited to 'proto.h')
-rw-r--r-- | proto.h | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -7413,12 +7413,11 @@ STATIC char* S_scan_heredoc(pTHX_ char *s) #define PERL_ARGS_ASSERT_SCAN_HEREDOC \ assert(s) -STATIC char* S_scan_ident(pTHX_ char *s, const char *send, char *dest, STRLEN destlen, I32 ck_uni) +STATIC char* S_scan_ident(pTHX_ char *s, char *dest, STRLEN destlen, I32 ck_uni) __attribute__nonnull__(pTHX_1) - __attribute__nonnull__(pTHX_2) - __attribute__nonnull__(pTHX_3); + __attribute__nonnull__(pTHX_2); #define PERL_ARGS_ASSERT_SCAN_IDENT \ - assert(s); assert(send); assert(dest) + assert(s); assert(dest) STATIC char* S_scan_inputsymbol(pTHX_ char *start) __attribute__warn_unused_result__ |