summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2012-08-15 20:49:59 -0600
committerKarl Williamson <public@khwilliamson.com>2012-11-19 17:13:00 -0700
commitf39a4dc253ff51cabd56ad1bfcb65547ce7be501 (patch)
treeb9c845c36da8cc74ca2466d565027e600fda3753
parentb99ea430ce1f7215248ce67a7471367dbc1380e0 (diff)
downloadperl-f39a4dc253ff51cabd56ad1bfcb65547ce7be501.tar.gz
regcomp: Change name of #define to better reflect its purpose
ANYOF_MAX is used for two different purposes; this separates them and creates a separate #define for one of them.
-rw-r--r--regcomp.c7
-rw-r--r--regcomp.h3
2 files changed, 6 insertions, 4 deletions
diff --git a/regcomp.c b/regcomp.c
index 6d868af994..3a95ea9da9 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -11762,7 +11762,7 @@ parseit:
Safefree(name);
}
RExC_parse = e + 1;
- namedclass = ANYOF_MAX; /* no official name, but it's named */
+ namedclass = ANYOF_UNIPROP; /* no official name, but it's named */
/* \p means they want Unicode semantics */
RExC_uni_semantics = 1;
@@ -12160,8 +12160,7 @@ parseit:
DO_N_POSIX(ret, namedclass, posixes,
PL_PosixXDigit, PL_XPosixXDigit);
break;
- case ANYOF_MAX:
- /* this is to handle \p and \P */
+ case ANYOF_UNIPROP: /* this is to handle \p and \P */
break;
default:
vFAIL("Invalid [::] class");
@@ -12504,7 +12503,7 @@ parseit:
*flagp |= HASWIDTH|SIMPLE;
break;
- case ANYOF_MAX:
+ case ANYOF_UNIPROP:
break;
case ANYOF_NBLANK:
diff --git a/regcomp.h b/regcomp.h
index e9a64feea0..1f6f765799 100644
--- a/regcomp.h
+++ b/regcomp.h
@@ -428,6 +428,9 @@ struct regnode_charclass_class {
#define ANYOF_HORIZWS (ANYOF_MAX+3)
#define ANYOF_NHORIZWS (ANYOF_MAX+4)
+#define ANYOF_UNIPROP (ANYOF_MAX+5) /* Used to indicate a Unicode property:
+ \p{} or \P{} */
+
/* Backward source code compatibility. */
#define ANYOF_ALNUML ANYOF_ALNUM