summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2012-08-24 14:00:22 -0600
committerKarl Williamson <public@khwilliamson.com>2012-08-25 23:21:29 -0600
commit83199d386f82b5fcc56cdeded547bf6bad800018 (patch)
tree37c15447f6e4fb7e10d086ce4d355f5d6636f4f3 /regcomp.c
parentde574e73f549b6438c8dfcf8623486003abaca82 (diff)
downloadperl-83199d386f82b5fcc56cdeded547bf6bad800018.tar.gz
utf8.c: Revise internal API of swash_init()
This revises the API for the version of swash_init() that is usable by core Perl. The external interface is unaffected. There is now a flags parameter to allow for future growth. And the core internal-only function that returns if a swash has a user-defined property in it or not has been removed. This information is now returned via the new flags parameter upon initialization, and is unavailable afterwards. This is to prepare for the flexibility to change the swash that is needed in future commits.
Diffstat (limited to 'regcomp.c')
-rw-r--r--regcomp.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/regcomp.c b/regcomp.c
index 28f2ecb401..c856c08379 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -11541,6 +11541,8 @@ parseit:
case 'P':
{
char *e;
+ U8 swash_init_flags = 0;
+
if (RExC_parse >= RExC_end)
vFAIL2("Empty \\%c{}", (U8)value);
if (*RExC_parse == '{') {
@@ -11597,7 +11599,8 @@ parseit:
0, /* not tr/// */
TRUE, /* this routine will handle
undefined properties */
- NULL, FALSE /* No inversion list */
+ NULL, /* No inversion list */
+ &swash_init_flags
);
if ( ! swash
|| ! SvROK(swash)
@@ -11632,7 +11635,8 @@ parseit:
* the swash is from a user-defined property, then this
* whole character class should be regarded as such */
has_user_defined_property =
- _is_swash_user_defined(swash);
+ (swash_init_flags
+ & _CORE_SWASH_INIT_USER_DEFINED_PROPERTY);
/* Invert if asking for the complement */
if (value == 'P') {