diff options
author | Karl Williamson <public@khwilliamson.com> | 2013-08-14 21:13:52 -0600 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2013-09-24 11:36:15 -0600 |
commit | 09b2b2e6f2b6aae46dfa46b10931186a9531a1e0 (patch) | |
tree | 7b5c3eac1de1d0715a101e5590c3e83c161dab91 /embed.fnc | |
parent | d1d040e539a86226d1a68f741e36ac5b3cfdbda9 (diff) | |
download | perl-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.
Diffstat (limited to 'embed.fnc')
-rw-r--r-- | embed.fnc | 71 |
1 files changed, 36 insertions, 35 deletions
@@ -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 |