diff options
author | Karl Williamson <public@khwilliamson.com> | 2012-08-24 14:00:22 -0600 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2012-08-25 23:21:29 -0600 |
commit | 83199d386f82b5fcc56cdeded547bf6bad800018 (patch) | |
tree | 37c15447f6e4fb7e10d086ce4d355f5d6636f4f3 /regcomp.c | |
parent | de574e73f549b6438c8dfcf8623486003abaca82 (diff) | |
download | perl-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.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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') { |