This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Allow utf8.c to access 4 inversion list functions
authorKarl Williamson <public@khwilliamson.com>
Sun, 5 Jun 2011 19:09:46 +0000 (13:09 -0600)
committerKarl Williamson <public@khwilliamson.com>
Sun, 3 Jul 2011 20:05:48 +0000 (14:05 -0600)
embed.fnc
embed.h
proto.h

index 7ccff7c..16a1c9b 100644 (file)
--- a/embed.fnc
+++ b/embed.fnc
@@ -1320,6 +1320,8 @@ EiMR      |SV*    |invlist_clone  |NN SV* const invlist
 EiMR   |UV*    |get_invlist_iter_addr  |NN SV* invlist
 EiM    |void   |invlist_iterinit|NN SV* invlist
 EsMR   |bool   |invlist_iternext|NN SV* invlist|NN UV* start|NN UV* end
+#endif
+#if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_UTF8_C)
 EpM    |void   |_invlist_intersection  |NN SV* const a|NN SV* const b|NN SV** i
 EpM    |void   |_invlist_union |NN SV* const a|NN SV* const b|NN SV** output
 EpM    |void   |_invlist_subtract|NN SV* const a|NN SV* const b|NN SV** result
diff --git a/embed.h b/embed.h
index 19d641b..e20a86c 100644 (file)
--- a/embed.h
+++ b/embed.h
 #  endif
 #  if defined(PERL_IN_REGCOMP_C)
 #define _invlist_array_init(a,b)       S__invlist_array_init(aTHX_ a,b)
-#define _invlist_intersection(a,b,c)   Perl__invlist_intersection(aTHX_ a,b,c)
-#define _invlist_invert(a)     Perl__invlist_invert(aTHX_ a)
-#define _invlist_subtract(a,b,c)       Perl__invlist_subtract(aTHX_ a,b,c)
-#define _invlist_union(a,b,c)  Perl__invlist_union(aTHX_ a,b,c)
 #define add_alternate(a,b,c)   S_add_alternate(aTHX_ a,b,c)
 #define add_cp_to_invlist(a,b) S_add_cp_to_invlist(aTHX_ a,b)
 #define add_data               S_add_data
 #define set_regclass_bit_fold(a,b,c,d,e)       S_set_regclass_bit_fold(aTHX_ a,b,c,d,e)
 #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_UTF8_C)
+#define _invlist_intersection(a,b,c)   Perl__invlist_intersection(aTHX_ a,b,c)
+#define _invlist_invert(a)     Perl__invlist_invert(aTHX_ a)
+#define _invlist_subtract(a,b,c)       Perl__invlist_subtract(aTHX_ a,b,c)
+#define _invlist_union(a,b,c)  Perl__invlist_union(aTHX_ a,b,c)
+#  endif
 #  if defined(PERL_IN_REGEXEC_C)
 #define find_byclass(a,b,c,d,e)        S_find_byclass(aTHX_ a,b,c,d,e)
 #define reg_check_named_buff_matched(a,b)      S_reg_check_named_buff_matched(aTHX_ a,b)
diff --git a/proto.h b/proto.h
index db49dbe..0541d23 100644 (file)
--- a/proto.h
+++ b/proto.h
@@ -5992,32 +5992,6 @@ PERL_STATIC_INLINE UV*   S__invlist_array_init(pTHX_ SV* const invlist, const bool
 #define PERL_ARGS_ASSERT__INVLIST_ARRAY_INIT   \
        assert(invlist)
 
-PERL_CALLCONV void     Perl__invlist_intersection(pTHX_ SV* const a, SV* const b, SV** i)
-                       __attribute__nonnull__(pTHX_1)
-                       __attribute__nonnull__(pTHX_2)
-                       __attribute__nonnull__(pTHX_3);
-#define PERL_ARGS_ASSERT__INVLIST_INTERSECTION \
-       assert(a); assert(b); assert(i)
-
-PERL_CALLCONV void     Perl__invlist_invert(pTHX_ SV* const invlist)
-                       __attribute__nonnull__(pTHX_1);
-#define PERL_ARGS_ASSERT__INVLIST_INVERT       \
-       assert(invlist)
-
-PERL_CALLCONV void     Perl__invlist_subtract(pTHX_ SV* const a, SV* const b, SV** result)
-                       __attribute__nonnull__(pTHX_1)
-                       __attribute__nonnull__(pTHX_2)
-                       __attribute__nonnull__(pTHX_3);
-#define PERL_ARGS_ASSERT__INVLIST_SUBTRACT     \
-       assert(a); assert(b); assert(result)
-
-PERL_CALLCONV void     Perl__invlist_union(pTHX_ SV* const a, SV* const b, SV** output)
-                       __attribute__nonnull__(pTHX_1)
-                       __attribute__nonnull__(pTHX_2)
-                       __attribute__nonnull__(pTHX_3);
-#define PERL_ARGS_ASSERT__INVLIST_UNION        \
-       assert(a); assert(b); assert(output)
-
 STATIC void    S_add_alternate(pTHX_ AV** alternate_ptr, U8* string, STRLEN len)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2);
@@ -6301,6 +6275,34 @@ STATIC I32       S_study_chunk(pTHX_ struct RExC_state_t *pRExC_state, regnode **scanp
        assert(pRExC_state); assert(scanp); assert(minlenp); assert(deltap); assert(last)
 
 #endif
+#if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_UTF8_C)
+PERL_CALLCONV void     Perl__invlist_intersection(pTHX_ SV* const a, SV* const b, SV** i)
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_2)
+                       __attribute__nonnull__(pTHX_3);
+#define PERL_ARGS_ASSERT__INVLIST_INTERSECTION \
+       assert(a); assert(b); assert(i)
+
+PERL_CALLCONV void     Perl__invlist_invert(pTHX_ SV* const invlist)
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT__INVLIST_INVERT       \
+       assert(invlist)
+
+PERL_CALLCONV void     Perl__invlist_subtract(pTHX_ SV* const a, SV* const b, SV** result)
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_2)
+                       __attribute__nonnull__(pTHX_3);
+#define PERL_ARGS_ASSERT__INVLIST_SUBTRACT     \
+       assert(a); assert(b); assert(result)
+
+PERL_CALLCONV void     Perl__invlist_union(pTHX_ SV* const a, SV* const b, SV** output)
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_2)
+                       __attribute__nonnull__(pTHX_3);
+#define PERL_ARGS_ASSERT__INVLIST_UNION        \
+       assert(a); assert(b); assert(output)
+
+#endif
 #if defined(PERL_IN_REGEXEC_C)
 STATIC char*   S_find_byclass(pTHX_ regexp * prog, const regnode *c, char *s, const char *strend, regmatch_info *reginfo)
                        __attribute__warn_unused_result__