This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
toke.c: Call base macro that does the same thing
authorKarl Williamson <public@khwilliamson.com>
Fri, 15 Mar 2013 19:44:26 +0000 (13:44 -0600)
committerKarl Williamson <public@khwilliamson.com>
Mon, 20 May 2013 14:55:52 +0000 (08:55 -0600)
SPACE_OR_TAB is the same thing as isBLANK, or perhaps more clearly
isBLANK_A.  And these latter macros only have one branch instead of 2
(but some extra masking)

toke.c

diff --git a/toke.c b/toke.c
index f1d09ef..aace601 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -137,7 +137,7 @@ static const char* const ident_too_long = "Identifier too long";
  * 1999-02-27 mjd-perl-patch@plover.com */
 #define isCONTROLVAR(x) (isUPPER(x) || strchr("[\\]^_?", (x)))
 
-#define SPACE_OR_TAB(c) ((c)==' '||(c)=='\t')
+#define SPACE_OR_TAB(c) isBLANK_A(c)
 
 /* LEX_* are values for PL_lex_state, the state of the lexer.
  * They are arranged oddly so that the guard on the switch statement