diff options
author | Karl Williamson <public@khwilliamson.com> | 2012-07-15 22:01:52 -0600 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2012-07-19 09:39:06 -0600 |
commit | afb790dd4ff01f57e25399cc548ef7f9609a1ad2 (patch) | |
tree | b1f089df75cf221a9e9b045d879755b8046b7842 /utf8.c | |
parent | 8b27d3db700fc2fce268e3d78e221a16ccaca2e8 (diff) | |
download | perl-afb790dd4ff01f57e25399cc548ef7f9609a1ad2.tar.gz |
utf8.c: Create API so internals can be hidden
This creates a function to hide some of the internal details of swashes
from the regex engine, which is the only authorized user, enforced
through #ifdefs in embed.fnc. These work closely together, but it's
best to have a clean interface.
Diffstat (limited to 'utf8.c')
-rw-r--r-- | utf8.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -4090,6 +4090,19 @@ Perl__swash_to_invlist(pTHX_ SV* const swash) return invlist; } +bool +Perl__is_swash_user_defined(pTHX_ SV* const swash) +{ + SV** ptr = hv_fetchs(MUTABLE_HV(SvRV(swash)), "USER_DEFINED", FALSE); + + PERL_ARGS_ASSERT__IS_SWASH_USER_DEFINED; + + if (! ptr) { + return FALSE; + } + return cBOOL(SvUV(*ptr)); +} + /* =for apidoc uvchr_to_utf8 |