summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2013-08-14 21:13:52 -0600
committerKarl Williamson <public@khwilliamson.com>2013-09-24 11:36:15 -0600
commit09b2b2e6f2b6aae46dfa46b10931186a9531a1e0 (patch)
tree7b5c3eac1de1d0715a101e5590c3e83c161dab91
parentd1d040e539a86226d1a68f741e36ac5b3cfdbda9 (diff)
downloadperl-09b2b2e6f2b6aae46dfa46b10931186a9531a1e0.tar.gz
Make typedef fully typedef
The regcomp.c struct RExC_state_t has not been usable fully as a typedef, requiring the 'struct' at times. This has caused me, and I presume others, wasted time when we forget to use it under those circumstances when it should be used, but it's never been a big enough issue to cause me to spend tuits on it. But, working on something else, I finally came to the realization of what the problem is. It is because proto.h is #included before regcomp.h is, and so functions that are declared in proto.h that have something that is a RExC_state_t as a parameter don't know that it is a typedef because that is defined in regcomp.h. A way around this is already used for other similar structures, and that is to declare them in perl.h which is always read in before proto.h, leaving the definitions to regcomp.h. Thus proto.h knows enough to compile. The structure was already declared in perl.h; just not typedef'd. Otherwise proto.h would not know about it at all. This patch moves two regcomp.c related declarations in perl.h to the same section as the others, and changes the one for RExC_state_t to be a typedef. All the 'struct' uses are removed.
-rw-r--r--embed.fnc71
-rw-r--r--embed.h3
-rw-r--r--perl.h5
-rw-r--r--proto.h67
-rw-r--r--regcomp.c8
5 files changed, 75 insertions, 79 deletions
diff --git a/embed.fnc b/embed.fnc
index 930600ea0a..7e50627838 100644
--- a/embed.fnc
+++ b/embed.fnc
@@ -1994,92 +1994,93 @@ p |OP * |tied_method|NN SV *methname|NN SV **sp \
|const U32 flags|U32 argc|...
#if defined(PERL_IN_REGCOMP_C)
-Es |regnode*|reg |NN struct RExC_state_t *pRExC_state \
+Es |regnode*|reg |NN RExC_state_t *pRExC_state \
|I32 paren|NN I32 *flagp|U32 depth
-Es |regnode*|reganode |NN struct RExC_state_t *pRExC_state|U8 op \
+Es |regnode*|reganode |NN RExC_state_t *pRExC_state|U8 op \
|U32 arg
-Es |regnode*|regatom |NN struct RExC_state_t *pRExC_state \
+Es |regnode*|regatom |NN RExC_state_t *pRExC_state \
|NN I32 *flagp|U32 depth
-Es |regnode*|regbranch |NN struct RExC_state_t *pRExC_state \
+Es |regnode*|regbranch |NN RExC_state_t *pRExC_state \
|NN I32 *flagp|I32 first|U32 depth
-Es |STRLEN |reguni |NN const struct RExC_state_t *pRExC_state \
+Es |STRLEN |reguni |NN const RExC_state_t *pRExC_state \
|UV uv|NN char *s
-Es |void |set_ANYOF_arg |NN struct RExC_state_t* const pRExC_state \
+Es |void |set_ANYOF_arg |NN RExC_state_t* const pRExC_state \
|NN regnode* const node \
|NULLOK SV* const cp_list \
|NULLOK SV* const runtime_defns \
|NULLOK SV* const swash \
|const bool has_user_defined_property
-Es |regnode*|regclass |NN struct RExC_state_t *pRExC_state \
+Es |regnode*|regclass |NN RExC_state_t *pRExC_state \
|NN I32 *flagp|U32 depth|const bool stop_at_1 \
|bool allow_multi_fold \
|const bool silence_non_portable \
|NULLOK SV** ret_invlist
-Es |bool|could_it_be_a_POSIX_class|NN struct RExC_state_t *pRExC_state
-Es |regnode*|handle_regex_sets|NN struct RExC_state_t *pRExC_state \
+Es |bool|could_it_be_a_POSIX_class|NN RExC_state_t *pRExC_state
+Es |regnode*|handle_regex_sets|NN RExC_state_t *pRExC_state \
|NULLOK SV ** return_invlist \
|NN I32 *flagp|U32 depth \
|NN char * const oregcomp_parse
-Es |void|parse_lparen_question_flags|NN struct RExC_state_t *pRExC_state
-Es |regnode*|reg_node |NN struct RExC_state_t *pRExC_state|U8 op
+Es |void|parse_lparen_question_flags|NN RExC_state_t *pRExC_state
+Es |regnode*|reg_node |NN RExC_state_t *pRExC_state|U8 op
Es |UV |reg_recode |const char value|NN SV **encp
-Es |regnode*|regpiece |NN struct RExC_state_t *pRExC_state \
+Es |regnode*|regpiece |NN RExC_state_t *pRExC_state \
|NN I32 *flagp|U32 depth
-Es |bool |grok_bslash_N |NN struct RExC_state_t *pRExC_state \
+Es |bool |grok_bslash_N |NN RExC_state_t *pRExC_state \
|NULLOK regnode** nodep|NULLOK UV *valuep \
|NN I32 *flagp|U32 depth|bool in_char_class \
|const bool strict
-Es |void |reginsert |NN struct RExC_state_t *pRExC_state \
+Es |void |reginsert |NN RExC_state_t *pRExC_state \
|U8 op|NN regnode *opnd|U32 depth
-Es |void |regtail |NN struct RExC_state_t *pRExC_state \
+Es |void |regtail |NN RExC_state_t *pRExC_state \
|NN regnode *p|NN const regnode *val|U32 depth
-Es |SV * |reg_scan_name |NN struct RExC_state_t *pRExC_state \
+Es |SV * |reg_scan_name |NN RExC_state_t *pRExC_state \
|U32 flags
-Es |U32 |join_exact |NN struct RExC_state_t *pRExC_state \
+Es |U32 |join_exact |NN RExC_state_t *pRExC_state \
|NN regnode *scan|NN UV *min_subtract \
|NN bool *has_exactf_sharp_s \
|U32 flags|NULLOK regnode *val|U32 depth
-EsRn |char * |regwhite |NN struct RExC_state_t *pRExC_state \
+EsRn |char * |regwhite |NN RExC_state_t *pRExC_state \
|NN char *p
-EsRn |char * |regpatws |NN struct RExC_state_t *pRExC_state \
+EsRn |char * |regpatws |NN RExC_state_t *pRExC_state \
|NN char *p|const bool recognize_comment
-Ei |void |alloc_maybe_populate_EXACT|NN struct RExC_state_t *pRExC_state \
+Ei |void |alloc_maybe_populate_EXACT|NN RExC_state_t *pRExC_state \
|NN regnode *node|NN I32 *flagp|STRLEN len \
|UV code_point
-Ei |U8 |compute_EXACTish|NN struct RExC_state_t *pRExC_state
-Es |char * |nextchar |NN struct RExC_state_t *pRExC_state
-Es |bool |reg_skipcomment|NN struct RExC_state_t *pRExC_state
-Es |void |scan_commit |NN const struct RExC_state_t *pRExC_state \
- |NN struct scan_data_t *data \
- |NN SSize_t *minlenp|int is_inf
+Ei |U8 |compute_EXACTish|NN RExC_state_t *pRExC_state
+Es |char * |nextchar |NN RExC_state_t *pRExC_state
+Es |bool |reg_skipcomment|NN RExC_state_t *pRExC_state
+Es |void |scan_commit |NN const RExC_state_t *pRExC_state \
+ |NN struct scan_data_t *data \
+ |NN SSize_t *minlenp \
+ |int is_inf
Es |void |populate_ANYOF_from_invlist|NN regnode *node|NN SV** invlist_ptr
-Esn |void |ssc_anything |NN const struct RExC_state_t *pRExC_state \
+Esn |void |ssc_anything |NN const RExC_state_t *pRExC_state \
|NN regnode_ssc *ssc
EsRn |int |ssc_is_anything|NN const regnode_ssc *ssc
-Esn |void |ssc_init |NN const struct RExC_state_t *pRExC_state \
+Esn |void |ssc_init |NN const RExC_state_t *pRExC_state \
|NN regnode_ssc *ssc
Esn |void |ssc_and |NN regnode_ssc *ssc \
|NN const regnode_ssc *and_with
-Esn |void |ssc_or |NN const struct RExC_state_t *pRExC_state \
+Esn |void |ssc_or |NN const RExC_state_t *pRExC_state \
|NN regnode_ssc *ssc \
|NN const regnode_ssc *or_with
-Es |SSize_t|study_chunk |NN struct RExC_state_t *pRExC_state \
+Es |SSize_t|study_chunk |NN RExC_state_t *pRExC_state \
|NN regnode **scanp|NN SSize_t *minlenp \
|NN SSize_t *deltap|NN regnode *last \
|NULLOK struct scan_data_t *data \
|I32 stopparen|NULLOK U8* recursed \
|NULLOK regnode_ssc *and_withp \
|U32 flags|U32 depth
-EsRn |U32 |add_data |NN struct RExC_state_t *pRExC_state|U32 n \
+EsRn |U32 |add_data |NN RExC_state_t *pRExC_state|U32 n \
|NN const char *s
rs |void |re_croak2 |bool utf8|NN const char* pat1|NN const char* pat2|...
-Ei |I32 |regpposixcc |NN struct RExC_state_t *pRExC_state \
+Ei |I32 |regpposixcc |NN RExC_state_t *pRExC_state \
|I32 value|const bool strict
-Es |I32 |make_trie |NN struct RExC_state_t *pRExC_state \
+Es |I32 |make_trie |NN RExC_state_t *pRExC_state \
|NN regnode *startbranch|NN regnode *first \
|NN regnode *last|NN regnode *tail \
|U32 word_count|U32 flags|U32 depth
-Es |void |make_trie_failtable |NN struct RExC_state_t *pRExC_state \
+Es |void |make_trie_failtable |NN RExC_state_t *pRExC_state \
|NN regnode *source|NN regnode *stclass \
|U32 depth
# ifdef DEBUGGING
@@ -2101,7 +2102,7 @@ Es |void |dump_trie_interim_list|NN const struct _reg_trie_data *trie\
Es |void |dump_trie_interim_table|NN const struct _reg_trie_data *trie\
|NULLOK HV* widecharmap|NN AV *revcharmap\
|U32 next_alloc|U32 depth
-Es |U8 |regtail_study |NN struct RExC_state_t *pRExC_state \
+Es |U8 |regtail_study |NN RExC_state_t *pRExC_state \
|NN regnode *p|NN const regnode *val|U32 depth
# endif
#endif
diff --git a/embed.h b/embed.h
index 7c6b4509ff..a060cced97 100644
--- a/embed.h
+++ b/embed.h
@@ -1564,9 +1564,6 @@
#define doform(a,b,c) S_doform(aTHX_ a,b,c)
#define space_join_names_mortal(a) S_space_join_names_mortal(aTHX_ a)
# endif
-# if defined(PERL_IN_REGCOMP_C)
-#define () (aTHX)
-# endif
# if defined(PERL_IN_SCOPE_C)
#define save_pushptri32ptr(a,b,c,d) S_save_pushptri32ptr(aTHX_ a,b,c,d)
#define save_scalar_at(a,b) S_save_scalar_at(aTHX_ a,b)
diff --git a/perl.h b/perl.h
index dfd425cbf0..bb196e6806 100644
--- a/perl.h
+++ b/perl.h
@@ -2212,9 +2212,6 @@ int isnan(double d);
#endif
-struct RExC_state_t;
-struct _reg_trie_data;
-
typedef MEM_SIZE STRLEN;
#ifdef PERL_MAD
@@ -3283,6 +3280,8 @@ struct regnode_charclass_class; /* Used in S_* functions in regcomp.c */
typedef struct regnode_charclass_class regnode_charclass_posixl;
typedef struct regnode_ssc regnode_ssc;
+typedef struct RExC_state_t RExC_state_t;
+struct _reg_trie_data;
struct ptr_tbl_ent {
struct ptr_tbl_ent* next;
diff --git a/proto.h b/proto.h
index f791985208..74c50e800b 100644
--- a/proto.h
+++ b/proto.h
@@ -5274,7 +5274,7 @@ STATIC bool S_put_latin1_charclass_innards(pTHX_ SV* sv, char* bitmap)
STATIC void S_regdump_extflags(pTHX_ const char *lead, const U32 flags);
STATIC void S_regdump_intflags(pTHX_ const char *lead, const U32 flags);
-STATIC U8 S_regtail_study(pTHX_ struct RExC_state_t *pRExC_state, regnode *p, const regnode *val, U32 depth)
+STATIC U8 S_regtail_study(pTHX_ RExC_state_t *pRExC_state, regnode *p, const regnode *val, U32 depth)
__attribute__nonnull__(pTHX_1)
__attribute__nonnull__(pTHX_2)
__attribute__nonnull__(pTHX_3);
@@ -6513,7 +6513,6 @@ STATIC SV * S_space_join_names_mortal(pTHX_ char *const *array)
#endif
#if defined(PERL_IN_REGCOMP_C)
-PERL_CALLCONV int is_inf (pTHX);
STATIC void S__append_range_to_invlist(pTHX_ SV* const invlist, const UV start, const UV end)
__attribute__nonnull__(pTHX_1);
#define PERL_ARGS_ASSERT__APPEND_RANGE_TO_INVLIST \
@@ -6534,26 +6533,26 @@ STATIC SV* S__new_invlist_C_array(pTHX_ const UV* const list)
PERL_STATIC_INLINE SV* S_add_cp_to_invlist(pTHX_ SV* invlist, const UV cp)
__attribute__warn_unused_result__;
-STATIC U32 S_add_data(struct RExC_state_t *pRExC_state, U32 n, const char *s)
+STATIC U32 S_add_data(RExC_state_t *pRExC_state, U32 n, const char *s)
__attribute__warn_unused_result__
__attribute__nonnull__(1)
__attribute__nonnull__(3);
#define PERL_ARGS_ASSERT_ADD_DATA \
assert(pRExC_state); assert(s)
-PERL_STATIC_INLINE void S_alloc_maybe_populate_EXACT(pTHX_ struct RExC_state_t *pRExC_state, regnode *node, I32 *flagp, STRLEN len, UV code_point)
+PERL_STATIC_INLINE void S_alloc_maybe_populate_EXACT(pTHX_ RExC_state_t *pRExC_state, regnode *node, I32 *flagp, STRLEN len, UV code_point)
__attribute__nonnull__(pTHX_1)
__attribute__nonnull__(pTHX_2)
__attribute__nonnull__(pTHX_3);
#define PERL_ARGS_ASSERT_ALLOC_MAYBE_POPULATE_EXACT \
assert(pRExC_state); assert(node); assert(flagp)
-PERL_STATIC_INLINE U8 S_compute_EXACTish(pTHX_ struct RExC_state_t *pRExC_state)
+PERL_STATIC_INLINE U8 S_compute_EXACTish(pTHX_ RExC_state_t *pRExC_state)
__attribute__nonnull__(pTHX_1);
#define PERL_ARGS_ASSERT_COMPUTE_EXACTISH \
assert(pRExC_state)
-STATIC bool S_could_it_be_a_POSIX_class(pTHX_ struct RExC_state_t *pRExC_state)
+STATIC bool S_could_it_be_a_POSIX_class(pTHX_ RExC_state_t *pRExC_state)
__attribute__nonnull__(pTHX_1);
#define PERL_ARGS_ASSERT_COULD_IT_BE_A_POSIX_CLASS \
assert(pRExC_state)
@@ -6570,13 +6569,13 @@ PERL_STATIC_INLINE IV* S_get_invlist_previous_index_addr(pTHX_ SV* invlist)
#define PERL_ARGS_ASSERT_GET_INVLIST_PREVIOUS_INDEX_ADDR \
assert(invlist)
-STATIC bool S_grok_bslash_N(pTHX_ struct RExC_state_t *pRExC_state, regnode** nodep, UV *valuep, I32 *flagp, U32 depth, bool in_char_class, const bool strict)
+STATIC bool S_grok_bslash_N(pTHX_ RExC_state_t *pRExC_state, regnode** nodep, UV *valuep, I32 *flagp, U32 depth, bool in_char_class, const bool strict)
__attribute__nonnull__(pTHX_1)
__attribute__nonnull__(pTHX_4);
#define PERL_ARGS_ASSERT_GROK_BSLASH_N \
assert(pRExC_state); assert(flagp)
-STATIC regnode* S_handle_regex_sets(pTHX_ struct RExC_state_t *pRExC_state, SV ** return_invlist, I32 *flagp, U32 depth, char * const oregcomp_parse)
+STATIC regnode* S_handle_regex_sets(pTHX_ RExC_state_t *pRExC_state, SV ** return_invlist, I32 *flagp, U32 depth, char * const oregcomp_parse)
__attribute__nonnull__(pTHX_1)
__attribute__nonnull__(pTHX_3)
__attribute__nonnull__(pTHX_5);
@@ -6657,7 +6656,7 @@ PERL_STATIC_INLINE void S_invlist_trim(pTHX_ SV* const invlist)
#define PERL_ARGS_ASSERT_INVLIST_TRIM \
assert(invlist)
-STATIC U32 S_join_exact(pTHX_ struct RExC_state_t *pRExC_state, regnode *scan, UV *min_subtract, bool *has_exactf_sharp_s, U32 flags, regnode *val, U32 depth)
+STATIC U32 S_join_exact(pTHX_ RExC_state_t *pRExC_state, regnode *scan, UV *min_subtract, bool *has_exactf_sharp_s, U32 flags, regnode *val, U32 depth)
__attribute__nonnull__(pTHX_1)
__attribute__nonnull__(pTHX_2)
__attribute__nonnull__(pTHX_3)
@@ -6665,7 +6664,7 @@ STATIC U32 S_join_exact(pTHX_ struct RExC_state_t *pRExC_state, regnode *scan, U
#define PERL_ARGS_ASSERT_JOIN_EXACT \
assert(pRExC_state); assert(scan); assert(min_subtract); assert(has_exactf_sharp_s)
-STATIC I32 S_make_trie(pTHX_ struct RExC_state_t *pRExC_state, regnode *startbranch, regnode *first, regnode *last, regnode *tail, U32 word_count, U32 flags, U32 depth)
+STATIC I32 S_make_trie(pTHX_ RExC_state_t *pRExC_state, regnode *startbranch, regnode *first, regnode *last, regnode *tail, U32 word_count, U32 flags, U32 depth)
__attribute__nonnull__(pTHX_1)
__attribute__nonnull__(pTHX_2)
__attribute__nonnull__(pTHX_3)
@@ -6674,19 +6673,19 @@ STATIC I32 S_make_trie(pTHX_ struct RExC_state_t *pRExC_state, regnode *startbra
#define PERL_ARGS_ASSERT_MAKE_TRIE \
assert(pRExC_state); assert(startbranch); assert(first); assert(last); assert(tail)
-STATIC void S_make_trie_failtable(pTHX_ struct RExC_state_t *pRExC_state, regnode *source, regnode *stclass, U32 depth)
+STATIC void S_make_trie_failtable(pTHX_ RExC_state_t *pRExC_state, regnode *source, regnode *stclass, U32 depth)
__attribute__nonnull__(pTHX_1)
__attribute__nonnull__(pTHX_2)
__attribute__nonnull__(pTHX_3);
#define PERL_ARGS_ASSERT_MAKE_TRIE_FAILTABLE \
assert(pRExC_state); assert(source); assert(stclass)
-STATIC char * S_nextchar(pTHX_ struct RExC_state_t *pRExC_state)
+STATIC char * S_nextchar(pTHX_ RExC_state_t *pRExC_state)
__attribute__nonnull__(pTHX_1);
#define PERL_ARGS_ASSERT_NEXTCHAR \
assert(pRExC_state)
-STATIC void S_parse_lparen_question_flags(pTHX_ struct RExC_state_t *pRExC_state)
+STATIC void S_parse_lparen_question_flags(pTHX_ RExC_state_t *pRExC_state)
__attribute__nonnull__(pTHX_1);
#define PERL_ARGS_ASSERT_PARSE_LPAREN_QUESTION_FLAGS \
assert(pRExC_state)
@@ -6704,13 +6703,13 @@ PERL_STATIC_NO_RET void S_re_croak2(pTHX_ bool utf8, const char* pat1, const cha
#define PERL_ARGS_ASSERT_RE_CROAK2 \
assert(pat1); assert(pat2)
-STATIC regnode* S_reg(pTHX_ struct RExC_state_t *pRExC_state, I32 paren, I32 *flagp, U32 depth)
+STATIC regnode* S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp, U32 depth)
__attribute__nonnull__(pTHX_1)
__attribute__nonnull__(pTHX_3);
#define PERL_ARGS_ASSERT_REG \
assert(pRExC_state); assert(flagp)
-STATIC regnode* S_reg_node(pTHX_ struct RExC_state_t *pRExC_state, U8 op)
+STATIC regnode* S_reg_node(pTHX_ RExC_state_t *pRExC_state, U8 op)
__attribute__nonnull__(pTHX_1);
#define PERL_ARGS_ASSERT_REG_NODE \
assert(pRExC_state)
@@ -6720,91 +6719,91 @@ STATIC UV S_reg_recode(pTHX_ const char value, SV **encp)
#define PERL_ARGS_ASSERT_REG_RECODE \
assert(encp)
-STATIC SV * S_reg_scan_name(pTHX_ struct RExC_state_t *pRExC_state, U32 flags)
+STATIC SV * S_reg_scan_name(pTHX_ RExC_state_t *pRExC_state, U32 flags)
__attribute__nonnull__(pTHX_1);
#define PERL_ARGS_ASSERT_REG_SCAN_NAME \
assert(pRExC_state)
-STATIC bool S_reg_skipcomment(pTHX_ struct RExC_state_t *pRExC_state)
+STATIC bool S_reg_skipcomment(pTHX_ RExC_state_t *pRExC_state)
__attribute__nonnull__(pTHX_1);
#define PERL_ARGS_ASSERT_REG_SKIPCOMMENT \
assert(pRExC_state)
-STATIC regnode* S_reganode(pTHX_ struct RExC_state_t *pRExC_state, U8 op, U32 arg)
+STATIC regnode* S_reganode(pTHX_ RExC_state_t *pRExC_state, U8 op, U32 arg)
__attribute__nonnull__(pTHX_1);
#define PERL_ARGS_ASSERT_REGANODE \
assert(pRExC_state)
-STATIC regnode* S_regatom(pTHX_ struct RExC_state_t *pRExC_state, I32 *flagp, U32 depth)
+STATIC regnode* S_regatom(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth)
__attribute__nonnull__(pTHX_1)
__attribute__nonnull__(pTHX_2);
#define PERL_ARGS_ASSERT_REGATOM \
assert(pRExC_state); assert(flagp)
-STATIC regnode* S_regbranch(pTHX_ struct RExC_state_t *pRExC_state, I32 *flagp, I32 first, U32 depth)
+STATIC regnode* S_regbranch(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, I32 first, U32 depth)
__attribute__nonnull__(pTHX_1)
__attribute__nonnull__(pTHX_2);
#define PERL_ARGS_ASSERT_REGBRANCH \
assert(pRExC_state); assert(flagp)
-STATIC regnode* S_regclass(pTHX_ struct RExC_state_t *pRExC_state, I32 *flagp, U32 depth, const bool stop_at_1, bool allow_multi_fold, const bool silence_non_portable, SV** ret_invlist)
+STATIC regnode* S_regclass(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth, const bool stop_at_1, bool allow_multi_fold, const bool silence_non_portable, SV** ret_invlist)
__attribute__nonnull__(pTHX_1)
__attribute__nonnull__(pTHX_2);
#define PERL_ARGS_ASSERT_REGCLASS \
assert(pRExC_state); assert(flagp)
-STATIC void S_reginsert(pTHX_ struct RExC_state_t *pRExC_state, U8 op, regnode *opnd, U32 depth)
+STATIC void S_reginsert(pTHX_ RExC_state_t *pRExC_state, U8 op, regnode *opnd, U32 depth)
__attribute__nonnull__(pTHX_1)
__attribute__nonnull__(pTHX_3);
#define PERL_ARGS_ASSERT_REGINSERT \
assert(pRExC_state); assert(opnd)
-STATIC char * S_regpatws(struct RExC_state_t *pRExC_state, char *p, const bool recognize_comment)
+STATIC char * S_regpatws(RExC_state_t *pRExC_state, char *p, const bool recognize_comment)
__attribute__warn_unused_result__
__attribute__nonnull__(1)
__attribute__nonnull__(2);
#define PERL_ARGS_ASSERT_REGPATWS \
assert(pRExC_state); assert(p)
-STATIC regnode* S_regpiece(pTHX_ struct RExC_state_t *pRExC_state, I32 *flagp, U32 depth)
+STATIC regnode* S_regpiece(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth)
__attribute__nonnull__(pTHX_1)
__attribute__nonnull__(pTHX_2);
#define PERL_ARGS_ASSERT_REGPIECE \
assert(pRExC_state); assert(flagp)
-PERL_STATIC_INLINE I32 S_regpposixcc(pTHX_ struct RExC_state_t *pRExC_state, I32 value, const bool strict)
+PERL_STATIC_INLINE I32 S_regpposixcc(pTHX_ RExC_state_t *pRExC_state, I32 value, const bool strict)
__attribute__nonnull__(pTHX_1);
#define PERL_ARGS_ASSERT_REGPPOSIXCC \
assert(pRExC_state)
-STATIC void S_regtail(pTHX_ struct RExC_state_t *pRExC_state, regnode *p, const regnode *val, U32 depth)
+STATIC void S_regtail(pTHX_ RExC_state_t *pRExC_state, regnode *p, const regnode *val, U32 depth)
__attribute__nonnull__(pTHX_1)
__attribute__nonnull__(pTHX_2)
__attribute__nonnull__(pTHX_3);
#define PERL_ARGS_ASSERT_REGTAIL \
assert(pRExC_state); assert(p); assert(val)
-STATIC STRLEN S_reguni(pTHX_ const struct RExC_state_t *pRExC_state, UV uv, char *s)
+STATIC STRLEN S_reguni(pTHX_ const RExC_state_t *pRExC_state, UV uv, char *s)
__attribute__nonnull__(pTHX_1)
__attribute__nonnull__(pTHX_3);
#define PERL_ARGS_ASSERT_REGUNI \
assert(pRExC_state); assert(s)
-STATIC char * S_regwhite(struct RExC_state_t *pRExC_state, char *p)
+STATIC char * S_regwhite(RExC_state_t *pRExC_state, char *p)
__attribute__warn_unused_result__
__attribute__nonnull__(1)
__attribute__nonnull__(2);
#define PERL_ARGS_ASSERT_REGWHITE \
assert(pRExC_state); assert(p)
-STATIC void S_scan_commit(pTHX_ const struct RExC_state_t *pRExC_state, struct scan_data_t *data, SSize_t *minlenp, int is_inf)
+STATIC void S_scan_commit(pTHX_ const RExC_state_t *pRExC_state, struct scan_data_t *data, SSize_t *minlenp, int is_inf)
__attribute__nonnull__(pTHX_1)
__attribute__nonnull__(pTHX_2)
__attribute__nonnull__(pTHX_3);
#define PERL_ARGS_ASSERT_SCAN_COMMIT \
assert(pRExC_state); assert(data); assert(minlenp)
-STATIC void S_set_ANYOF_arg(pTHX_ struct RExC_state_t* const pRExC_state, regnode* const node, SV* const cp_list, SV* const runtime_defns, SV* const swash, const bool has_user_defined_property)
+STATIC void S_set_ANYOF_arg(pTHX_ RExC_state_t* const pRExC_state, regnode* const node, SV* const cp_list, SV* const runtime_defns, SV* const swash, const bool has_user_defined_property)
__attribute__nonnull__(pTHX_1)
__attribute__nonnull__(pTHX_2);
#define PERL_ARGS_ASSERT_SET_ANYOF_ARG \
@@ -6816,13 +6815,13 @@ STATIC void S_ssc_and(regnode_ssc *ssc, const regnode_ssc *and_with)
#define PERL_ARGS_ASSERT_SSC_AND \
assert(ssc); assert(and_with)
-STATIC void S_ssc_anything(const struct RExC_state_t *pRExC_state, regnode_ssc *ssc)
+STATIC void S_ssc_anything(const RExC_state_t *pRExC_state, regnode_ssc *ssc)
__attribute__nonnull__(1)
__attribute__nonnull__(2);
#define PERL_ARGS_ASSERT_SSC_ANYTHING \
assert(pRExC_state); assert(ssc)
-STATIC void S_ssc_init(const struct RExC_state_t *pRExC_state, regnode_ssc *ssc)
+STATIC void S_ssc_init(const RExC_state_t *pRExC_state, regnode_ssc *ssc)
__attribute__nonnull__(1)
__attribute__nonnull__(2);
#define PERL_ARGS_ASSERT_SSC_INIT \
@@ -6834,14 +6833,14 @@ STATIC int S_ssc_is_anything(const regnode_ssc *ssc)
#define PERL_ARGS_ASSERT_SSC_IS_ANYTHING \
assert(ssc)
-STATIC void S_ssc_or(const struct RExC_state_t *pRExC_state, regnode_ssc *ssc, const regnode_ssc *or_with)
+STATIC void S_ssc_or(const RExC_state_t *pRExC_state, regnode_ssc *ssc, const regnode_ssc *or_with)
__attribute__nonnull__(1)
__attribute__nonnull__(2)
__attribute__nonnull__(3);
#define PERL_ARGS_ASSERT_SSC_OR \
assert(pRExC_state); assert(ssc); assert(or_with)
-STATIC SSize_t S_study_chunk(pTHX_ struct RExC_state_t *pRExC_state, regnode **scanp, SSize_t *minlenp, SSize_t *deltap, regnode *last, struct scan_data_t *data, I32 stopparen, U8* recursed, regnode_ssc *and_withp, U32 flags, U32 depth)
+STATIC SSize_t S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp, SSize_t *minlenp, SSize_t *deltap, regnode *last, struct scan_data_t *data, I32 stopparen, U8* recursed, regnode_ssc *and_withp, U32 flags, U32 depth)
__attribute__nonnull__(pTHX_1)
__attribute__nonnull__(pTHX_2)
__attribute__nonnull__(pTHX_3)
diff --git a/regcomp.c b/regcomp.c
index 8252ba61aa..2899ff2839 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -100,7 +100,7 @@ extern const struct regexp_engine my_reg_engine;
#endif
-typedef struct RExC_state_t {
+struct RExC_state_t {
U32 flags; /* RXf_* are we folding, multilining? */
U32 pm_flags; /* PMf_* stuff from the calling PMOP */
char *precomp; /* uncompiled string. */
@@ -160,7 +160,7 @@ typedef struct RExC_state_t {
#define RExC_lastnum (pRExC_state->lastnum)
#define RExC_paren_name_list (pRExC_state->paren_name_list)
#endif
-} RExC_state_t;
+};
#define RExC_flags (pRExC_state->flags)
#define RExC_pm_flags (pRExC_state->pm_flags)
@@ -8410,7 +8410,7 @@ S__invlistEQ(pTHX_ SV* const a, SV* const b, const bool complement_b)
/* End of inversion list object */
STATIC void
-S_parse_lparen_question_flags(pTHX_ struct RExC_state_t *pRExC_state)
+S_parse_lparen_question_flags(pTHX_ RExC_state_t *pRExC_state)
{
/* This parses the flags that are in either the '(?foo)' or '(?foo:bar)'
* constructs, and updates RExC_flags with them. On input, RExC_parse
@@ -14044,7 +14044,7 @@ parseit:
#undef HAS_NONLOCALE_RUNTIME_PROPERTY_DEFINITION
STATIC void
-S_set_ANYOF_arg(pTHX_ struct RExC_state_t* const pRExC_state,
+S_set_ANYOF_arg(pTHX_ RExC_state_t* const pRExC_state,
regnode* const node,
SV* const cp_list,
SV* const runtime_defns,