This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Move two regex functions so that can use re debug
authorKarl Williamson <khw@cpan.org>
Mon, 24 Feb 2020 04:00:14 +0000 (21:00 -0700)
committerKarl Williamson <khw@cpan.org>
Mon, 2 Mar 2020 18:45:21 +0000 (11:45 -0700)
These have to have a version in re_comp.c for re.pm to work on them.

embed.fnc
embed.h
proto.h
regcomp.c

index bbba824..30829b3 100644 (file)
--- a/embed.fnc
+++ b/embed.fnc
@@ -2040,6 +2040,11 @@ EXp      |SV *   |handle_user_defined_property|NN const char * name          \
                                             |NN bool *user_defined_ptr     \
                                             |NN SV * msg                   \
                                             |const STRLEN level
+ERS    |REGEXP*|compile_wildcard|NN const char * name|const STRLEN len     \
+                                |const bool ignore_case
+ES     |I32    |execute_wildcard|NN REGEXP * const prog|NN char* stringarg \
+                               |NN char* strend|NN char* strbeg \
+                               |SSize_t minend |NN SV* screamer|U32 nosave
 #  ifdef DEBUGGING
 EFp    |int    |re_indentf     |NN const char *fmt|U32 depth|...
 ES     |void        |regdump_intflags|NULLOK const char *lead| const U32 flags
@@ -2082,11 +2087,6 @@ ESR      |bool   |regtail_study  |NN RExC_state_t *pRExC_state \
                                |NN regnode_offset p|NN const regnode_offset val|U32 depth
 #  endif
 #  ifndef PERL_EXT_RE_BUILD
-ERS    |REGEXP*|compile_wildcard|NN const char * name|const STRLEN len     \
-                                |const bool ignore_case
-ES     |I32    |execute_wildcard|NN REGEXP * const prog|NN char* stringarg \
-                               |NN char* strend|NN char* strbeg \
-                               |SSize_t minend |NN SV* screamer|U32 nosave
 EiRT   |UV*    |_invlist_array_init    |NN SV* const invlist|const bool will_have_0
 EiRT   |UV     |invlist_max    |NN SV* const invlist
 EiRT   |IV*    |get_invlist_previous_index_addr|NN SV* invlist
diff --git a/embed.h b/embed.h
index f10fb7a..603638f 100644 (file)
--- a/embed.h
+++ b/embed.h
 #    if defined(PERL_IN_REGCOMP_C)
 #define _append_range_to_invlist(a,b,c)        S__append_range_to_invlist(aTHX_ a,b,c)
 #define _invlist_array_init    S__invlist_array_init
-#define compile_wildcard(a,b,c)        S_compile_wildcard(aTHX_ a,b,c)
-#define execute_wildcard(a,b,c,d,e,f,g)        S_execute_wildcard(aTHX_ a,b,c,d,e,f,g)
 #define get_invlist_previous_index_addr        S_get_invlist_previous_index_addr
 #define invlist_clear(a)       S_invlist_clear(aTHX_ a)
 #define invlist_max            S_invlist_max
 #define add_data               S_add_data
 #define add_multi_match(a,b,c) S_add_multi_match(aTHX_ a,b,c)
 #define change_engine_size(a,b)        S_change_engine_size(aTHX_ a,b)
+#define compile_wildcard(a,b,c)        S_compile_wildcard(aTHX_ a,b,c)
 #define compute_EXACTish       S_compute_EXACTish
 #define construct_ahocorasick_from_trie(a,b,c) S_construct_ahocorasick_from_trie(aTHX_ a,b,c)
 #define edit_distance          S_edit_distance
+#define execute_wildcard(a,b,c,d,e,f,g)        S_execute_wildcard(aTHX_ a,b,c,d,e,f,g)
 #define find_first_differing_byte_pos  S_find_first_differing_byte_pos
 #define get_ANYOFM_contents(a) S_get_ANYOFM_contents(aTHX_ a)
 #define get_ANYOF_cp_list_for_ssc(a,b) S_get_ANYOF_cp_list_for_ssc(aTHX_ a,b)
diff --git a/proto.h b/proto.h
index 581e5cd..c825c07 100644 (file)
--- a/proto.h
+++ b/proto.h
@@ -4256,14 +4256,6 @@ PERL_STATIC_INLINE UV*   S__invlist_array_init(SV* const invlist, const bool will_
        assert(invlist)
 #endif
 
-STATIC REGEXP* S_compile_wildcard(pTHX_ const char * name, const STRLEN len, const bool ignore_case)
-                       __attribute__warn_unused_result__;
-#define PERL_ARGS_ASSERT_COMPILE_WILDCARD      \
-       assert(name)
-
-STATIC I32     S_execute_wildcard(pTHX_ REGEXP * const prog, char* stringarg, char* strend, char* strbeg, SSize_t minend, SV* screamer, U32 nosave);
-#define PERL_ARGS_ASSERT_EXECUTE_WILDCARD      \
-       assert(prog); assert(stringarg); assert(strend); assert(strbeg); assert(screamer)
 #ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE IV* S_get_invlist_previous_index_addr(SV* invlist)
                        __attribute__warn_unused_result__;
@@ -5581,6 +5573,11 @@ STATIC AV*       S_add_multi_match(pTHX_ AV* multi_char_matches, SV* multi_string, con
 STATIC void    S_change_engine_size(pTHX_ RExC_state_t *pRExC_state, const Ptrdiff_t size);
 #define PERL_ARGS_ASSERT_CHANGE_ENGINE_SIZE    \
        assert(pRExC_state)
+STATIC REGEXP* S_compile_wildcard(pTHX_ const char * name, const STRLEN len, const bool ignore_case)
+                       __attribute__warn_unused_result__;
+#define PERL_ARGS_ASSERT_COMPILE_WILDCARD      \
+       assert(name)
+
 #ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE U8  S_compute_EXACTish(RExC_state_t *pRExC_state);
 #define PERL_ARGS_ASSERT_COMPUTE_EXACTISH      \
@@ -5594,6 +5591,9 @@ STATIC int        S_edit_distance(const UV *src, const UV *tgt, const STRLEN x, const S
 #define PERL_ARGS_ASSERT_EDIT_DISTANCE \
        assert(src); assert(tgt)
 
+STATIC I32     S_execute_wildcard(pTHX_ REGEXP * const prog, char* stringarg, char* strend, char* strbeg, SSize_t minend, SV* screamer, U32 nosave);
+#define PERL_ARGS_ASSERT_EXECUTE_WILDCARD      \
+       assert(prog); assert(stringarg); assert(strend); assert(strbeg); assert(screamer)
 #ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE Size_t      S_find_first_differing_byte_pos(const U8 * s1, const U8 * s2, const Size_t max);
 #define PERL_ARGS_ASSERT_FIND_FIRST_DIFFERING_BYTE_POS \
index 39b50ca..c9d34db 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -22973,6 +22973,7 @@ S_get_extended_utf8_msg(pTHX_ const UV cp)
 }
 
 #  endif
+#endif /* end of ! PERL_IN_XSUB_RE */
 
 STATIC REGEXP *
 S_compile_wildcard(pTHX_ const char * name, const STRLEN len,
@@ -23010,6 +23011,8 @@ S_execute_wildcard(pTHX_ REGEXP * const prog, char* stringarg, char *strend,
     return result;
 }
 
+#ifndef PERL_IN_XSUB_RE
+
 SV *
 Perl_handle_user_defined_property(pTHX_