summaryrefslogtreecommitdiff
path: root/regexec.c
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2011-01-17 21:43:14 -0700
committerKarl Williamson <public@khwilliamson.com>2011-01-17 22:17:45 -0700
commit1dcf4a1b6573706fa5b4287735fa04e7653cb601 (patch)
treefb18bd8a6628b5003723bf556f9f5bd959d8b9dd /regexec.c
parent48052fe507e137a3e91199e64287b68b65a87c87 (diff)
downloadperl-1dcf4a1b6573706fa5b4287735fa04e7653cb601.tar.gz
regexec.c: Fix so will compile on Windows
Commit cfaf538b6276c6a8ef80ff6c66e106c6a4f1caaa introduced changes that cause this to not compile on Windows. It did not accept empty macro parameters, unlike gcc. This just creates a placeholder macro that expands to nothing to give the preprocessor something to grab onto.
Diffstat (limited to 'regexec.c')
-rw-r--r--regexec.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/regexec.c b/regexec.c
index cbdbeaf9ce..748e047211 100644
--- a/regexec.c
+++ b/regexec.c
@@ -179,6 +179,7 @@
#define RE_utf8_posix_digit PL_utf8_posix_digit
#endif
+#define PLACEHOLDER /* Something for the preprocessor to grab onto */
/* The actual code for CCC_TRY, which uses several variables from the routine
* it's callable from. It is designed to be the bulk of a case statement.
@@ -227,7 +228,7 @@
(U8*)locinput, TRUE)), \
CLASS, STR) \
case NNAME: \
- _CCC_TRY_CODE( , FUNC, \
+ _CCC_TRY_CODE( PLACEHOLDER , FUNC, \
cBOOL(swash_fetch(CAT2(PL_utf8_,CLASS), \
(U8*)locinput, TRUE)), \
CLASS, STR) \
@@ -251,7 +252,8 @@
_CCC_TRY_CODE( !, LCFUNC, LCFUNC_utf8((U8*)locinput), CLASS, STR) \
case NNAMEL: \
PL_reg_flags |= RF_tainted; \
- _CCC_TRY_CODE( , LCFUNC, LCFUNC_utf8((U8*)locinput), CLASS, STR) \
+ _CCC_TRY_CODE( PLACEHOLDER, LCFUNC, LCFUNC_utf8((U8*)locinput), \
+ CLASS, STR) \
case NAMEA: \
if (locinput >= PL_regeol || ! FUNCA(nextchr)) { \
sayNO; \
@@ -1396,16 +1398,16 @@ if ((!reginfo || regtry(reginfo, &s))) \
* NBOUND. This is accomplished by passing it in either the if or else clause,
* with the other one being empty */
#define FBC_BOUND(TEST_NON_UTF8, TEST1_UTF8, TEST2_UTF8) \
- FBC_BOUND_COMMON(UTF8_LOAD(TEST1_UTF8, TEST2_UTF8, REXEC_FBC_TRYIT, ), TEST_NON_UTF8, REXEC_FBC_TRYIT, )
+ FBC_BOUND_COMMON(UTF8_LOAD(TEST1_UTF8, TEST2_UTF8, REXEC_FBC_TRYIT, PLACEHOLDER), TEST_NON_UTF8, REXEC_FBC_TRYIT, PLACEHOLDER)
#define FBC_BOUND_NOLOAD(TEST_NON_UTF8, TEST1_UTF8, TEST2_UTF8) \
- FBC_BOUND_COMMON(UTF8_NOLOAD(TEST_NON_UTF8, REXEC_FBC_TRYIT, ), TEST_NON_UTF8, REXEC_FBC_TRYIT, )
+ FBC_BOUND_COMMON(UTF8_NOLOAD(TEST_NON_UTF8, REXEC_FBC_TRYIT, PLACEHOLDER), TEST_NON_UTF8, REXEC_FBC_TRYIT, PLACEHOLDER)
#define FBC_NBOUND(TEST_NON_UTF8, TEST1_UTF8, TEST2_UTF8) \
- FBC_BOUND_COMMON(UTF8_LOAD(TEST1_UTF8, TEST2_UTF8, , REXEC_FBC_TRYIT), TEST_NON_UTF8, , REXEC_FBC_TRYIT)
+ FBC_BOUND_COMMON(UTF8_LOAD(TEST1_UTF8, TEST2_UTF8, PLACEHOLDER, REXEC_FBC_TRYIT), TEST_NON_UTF8, PLACEHOLDER, REXEC_FBC_TRYIT)
#define FBC_NBOUND_NOLOAD(TEST_NON_UTF8, TEST1_UTF8, TEST2_UTF8) \
- FBC_BOUND_COMMON(UTF8_NOLOAD(TEST_NON_UTF8, , REXEC_FBC_TRYIT), TEST_NON_UTF8, , REXEC_FBC_TRYIT)
+ FBC_BOUND_COMMON(UTF8_NOLOAD(TEST_NON_UTF8, PLACEHOLDER, REXEC_FBC_TRYIT), TEST_NON_UTF8, PLACEHOLDER, REXEC_FBC_TRYIT)
/* Common to the BOUND and NBOUND cases. Unfortunately the UTF8 tests need to