embed.fnc: Allow toke.c to call core_swash_init()
authorKarl Williamson <public@khwilliamson.com>
Fri, 9 Nov 2012 16:46:37 +0000 (09:46 -0700)
committerKarl Williamson <public@khwilliamson.com>
Sun, 11 Nov 2012 17:11:34 +0000 (10:11 -0700)
This internal function is allowed to just a few core functions
by #ifdef's in embed.fnc.  Expand the list to include toke.c, as it will
be needed in a future commit.

embed.fnc
embed.h
proto.h

index 336f4b2..d148ec8 100644 (file)
--- a/embed.fnc
+++ b/embed.fnc
@@ -1410,10 +1410,12 @@ EXMpR   |SV*    |_swash_to_invlist      |NN SV* const swash
 EXMpR  |SV*    |_add_range_to_invlist  |NULLOK SV* invlist|const UV start|const UV end
 EXMp   |void   |_invlist_populate_swatch   |NN SV* const invlist|const UV start|const UV end|NN U8* swatch
 #endif
-#if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_REGEXEC_C) || defined(PERL_IN_UTF8_C)
+#if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_REGEXEC_C) || defined(PERL_IN_UTF8_C) || defined(PERL_IN_TOKE_C)
 EXp    |SV*    |_core_swash_init|NN const char* pkg|NN const char* name \
                |NN SV* listsv|I32 minbits|I32 none \
                |NULLOK SV* invlist|NULLOK U8* const flags_p
+#endif
+#if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_REGEXEC_C) || defined(PERL_IN_UTF8_C)
 EXMpR  |SV*    |_invlist_contents|NN SV* const invlist
 EiMR   |UV*    |_get_invlist_len_addr  |NN SV* invlist
 EiMR   |UV     |_invlist_len   |NN SV* const invlist
diff --git a/embed.h b/embed.h
index 42f1556..1d1fc47 100644 (file)
--- a/embed.h
+++ b/embed.h
 #define study_chunk(a,b,c,d,e,f,g,h,i,j,k)     S_study_chunk(aTHX_ a,b,c,d,e,f,g,h,i,j,k)
 #  endif
 #  if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_REGEXEC_C) || defined(PERL_IN_UTF8_C)
-#define _core_swash_init(a,b,c,d,e,f,g)        Perl__core_swash_init(aTHX_ a,b,c,d,e,f,g)
 #define _get_invlist_len_addr(a)       S__get_invlist_len_addr(aTHX_ a)
 #define _get_swash_invlist(a)  Perl__get_swash_invlist(aTHX_ a)
 #define _invlist_contains_cp(a,b)      S__invlist_contains_cp(aTHX_ a,b)
 #define _invlist_search(a,b)   Perl__invlist_search(aTHX_ a,b)
 #define _swash_inversion_hash(a)       Perl__swash_inversion_hash(aTHX_ a)
 #  endif
+#  if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_REGEXEC_C) || defined(PERL_IN_UTF8_C) || defined(PERL_IN_TOKE_C)
+#define _core_swash_init(a,b,c,d,e,f,g)        Perl__core_swash_init(aTHX_ a,b,c,d,e,f,g)
+#  endif
 #  if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_UTF8_C)
 #define _add_range_to_invlist(a,b,c)   Perl__add_range_to_invlist(aTHX_ a,b,c)
 #define _invlist_intersection_maybe_complement_2nd(a,b,c,d)    Perl__invlist_intersection_maybe_complement_2nd(aTHX_ a,b,c,d)
diff --git a/proto.h b/proto.h
index 4b3ad00..8929439 100644 (file)
--- a/proto.h
+++ b/proto.h
@@ -6627,13 +6627,6 @@ STATIC I32       S_study_chunk(pTHX_ struct RExC_state_t *pRExC_state, regnode **scanp
 
 #endif
 #if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_REGEXEC_C) || defined(PERL_IN_UTF8_C)
-PERL_CALLCONV SV*      Perl__core_swash_init(pTHX_ const char* pkg, const char* name, SV* listsv, I32 minbits, I32 none, SV* invlist, U8* const flags_p)
-                       __attribute__nonnull__(pTHX_1)
-                       __attribute__nonnull__(pTHX_2)
-                       __attribute__nonnull__(pTHX_3);
-#define PERL_ARGS_ASSERT__CORE_SWASH_INIT      \
-       assert(pkg); assert(name); assert(listsv)
-
 PERL_STATIC_INLINE UV* S__get_invlist_len_addr(pTHX_ SV* invlist)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1);
@@ -6677,6 +6670,15 @@ PERL_CALLCONV HV*        Perl__swash_inversion_hash(pTHX_ SV* const swash)
        assert(swash)
 
 #endif
+#if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_REGEXEC_C) || defined(PERL_IN_UTF8_C) || defined(PERL_IN_TOKE_C)
+PERL_CALLCONV SV*      Perl__core_swash_init(pTHX_ const char* pkg, const char* name, SV* listsv, I32 minbits, I32 none, SV* invlist, U8* const flags_p)
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_2)
+                       __attribute__nonnull__(pTHX_3);
+#define PERL_ARGS_ASSERT__CORE_SWASH_INIT      \
+       assert(pkg); assert(name); assert(listsv)
+
+#endif
 #if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_UTF8_C)
 PERL_CALLCONV SV*      Perl__add_range_to_invlist(pTHX_ SV* invlist, const UV start, const UV end)
                        __attribute__warn_unused_result__;