Skip to content

Commit

Permalink
embed.fnc: Change 'b' flag to not imply 'p' flag
Browse files Browse the repository at this point in the history
By doing this, we make it more general, which will be useful in a few
commits.
  • Loading branch information
khwilliamson committed May 13, 2016
1 parent 52de5f3 commit 5ff52e3
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 32 deletions.
63 changes: 33 additions & 30 deletions embed.fnc
Expand Up @@ -36,6 +36,9 @@
: EXTERN_C (and then won't be automatically skipped for -DNO_MATHOMS
: builds).
:
: Note that this flag no longer automatically adds a 'Perl_' prefix to the
: name. Additionally specify 'p' to do that.
:
: add entry to the list of exported symbols;
: don't define PERL_ARGS_ASSERT_FOO
:
Expand Down Expand Up @@ -564,14 +567,14 @@ Apd |void |hv_clear |NULLOK HV *hv
: used in SAVEHINTS() and op.c
ApdR |HV * |hv_copy_hints_hv|NULLOK HV *const ohv
Ap |void |hv_delayfree_ent|NN HV *hv|NULLOK HE *entry
Abmd |SV* |hv_delete |NULLOK HV *hv|NN const char *key|I32 klen \
Abmdp |SV* |hv_delete |NULLOK HV *hv|NN const char *key|I32 klen \
|I32 flags
Abmd |SV* |hv_delete_ent |NULLOK HV *hv|NN SV *keysv|I32 flags|U32 hash
AbmdR |bool |hv_exists |NULLOK HV *hv|NN const char *key|I32 klen
AbmdR |bool |hv_exists_ent |NULLOK HV *hv|NN SV *keysv|U32 hash
Abmd |SV** |hv_fetch |NULLOK HV *hv|NN const char *key|I32 klen \
Abmdp |SV* |hv_delete_ent |NULLOK HV *hv|NN SV *keysv|I32 flags|U32 hash
AbmdRp |bool |hv_exists |NULLOK HV *hv|NN const char *key|I32 klen
AbmdRp |bool |hv_exists_ent |NULLOK HV *hv|NN SV *keysv|U32 hash
Abmdp |SV** |hv_fetch |NULLOK HV *hv|NN const char *key|I32 klen \
|I32 lval
Abmd |HE* |hv_fetch_ent |NULLOK HV *hv|NN SV *keysv|I32 lval|U32 hash
Abmdp |HE* |hv_fetch_ent |NULLOK HV *hv|NN SV *keysv|I32 lval|U32 hash
Ap |void* |hv_common |NULLOK HV *hv|NULLOK SV *keysv \
|NULLOK const char* key|STRLEN klen|int flags \
|int action|NULLOK SV *val|U32 hash
Expand Down Expand Up @@ -613,11 +616,11 @@ Xpd |struct refcounted_he *|refcounted_he_new_sv \
|U32 hash|NULLOK SV *value|U32 flags
Xpd |void |refcounted_he_free|NULLOK struct refcounted_he *he
Xpd |struct refcounted_he *|refcounted_he_inc|NULLOK struct refcounted_he *he
Abmd |SV** |hv_store |NULLOK HV *hv|NULLOK const char *key \
Apbmd |SV** |hv_store |NULLOK HV *hv|NULLOK const char *key \
|I32 klen|NULLOK SV *val|U32 hash
Abmd |HE* |hv_store_ent |NULLOK HV *hv|NULLOK SV *key|NULLOK SV *val\
Apbmd |HE* |hv_store_ent |NULLOK HV *hv|NULLOK SV *key|NULLOK SV *val\
|U32 hash
AbmM |SV** |hv_store_flags |NULLOK HV *hv|NULLOK const char *key \
ApbmM |SV** |hv_store_flags |NULLOK HV *hv|NULLOK const char *key \
|I32 klen|NULLOK SV *val|U32 hash|int flags
Amd |void |hv_undef |NULLOK HV *hv
poX |void |hv_undef_flags |NULLOK HV *hv|U32 flags
Expand Down Expand Up @@ -985,7 +988,7 @@ Ap |void |newPROG |NN OP* o
Apda |OP* |newRANGE |I32 flags|NN OP* left|NN OP* right
Apda |OP* |newSLICEOP |I32 flags|NULLOK OP* subscript|NULLOK OP* listop
Apda |OP* |newSTATEOP |I32 flags|NULLOK char* label|NULLOK OP* o
Abm |CV* |newSUB |I32 floor|NULLOK OP* o|NULLOK OP* proto \
Apbm |CV* |newSUB |I32 floor|NULLOK OP* o|NULLOK OP* proto \
|NULLOK OP* block
p |CV * |newXS_len_flags|NULLOK const char *name|STRLEN len \
|NN XSUBADDR_t subaddr\
Expand All @@ -998,7 +1001,7 @@ ApM |CV * |newXS_flags |NULLOK const char *name|NN XSUBADDR_t subaddr\
|NULLOK const char *const proto|U32 flags
Apd |CV* |newXS |NULLOK const char *name|NN XSUBADDR_t subaddr\
|NN const char *filename
AmdbR |AV* |newAV
ApmdbR |AV* |newAV
Apa |OP* |newAVREF |NN OP* o
Apda |OP* |newBINOP |I32 type|I32 flags|NULLOK OP* first|NULLOK OP* last
Apa |OP* |newCVREF |I32 flags|NULLOK OP* o
Expand All @@ -1007,7 +1010,7 @@ Am |GV* |newGVgen |NN const char* pack
Apa |GV* |newGVgen_flags |NN const char* pack|U32 flags
Apa |OP* |newGVREF |I32 type|NULLOK OP* o
ApaR |OP* |newHVREF |NN OP* o
AmdbR |HV* |newHV
ApmdbR |HV* |newHV
ApaR |HV* |newHVhv |NULLOK HV *hv
Apabm |IO* |newIO
Apda |OP* |newLISTOP |I32 type|I32 flags|NULLOK OP* first|NULLOK OP* last
Expand Down Expand Up @@ -1160,7 +1163,7 @@ s |OP* |pmtrans |NN OP* o|NN OP* expr|NN OP* repl
#endif
Ap |void |pop_scope
Ap |void |push_scope
Amb |OP* |ref |NULLOK OP* o|I32 type
Apmb |OP* |ref |NULLOK OP* o|I32 type
#if defined(PERL_IN_OP_C)
s |OP* |refkids |NULLOK OP* o|I32 type
#endif
Expand Down Expand Up @@ -1352,18 +1355,18 @@ Apd |IO* |sv_2io |NN SV *const sv
#if defined(PERL_IN_SV_C)
s |bool |glob_2number |NN GV* const gv
#endif
Amb |IV |sv_2iv |NN SV *sv
Apmb |IV |sv_2iv |NN SV *sv
Apd |IV |sv_2iv_flags |NN SV *const sv|const I32 flags
Apd |SV* |sv_2mortal |NULLOK SV *const sv
Apd |NV |sv_2nv_flags |NN SV *const sv|const I32 flags
: Used in pp.c, pp_hot.c, sv.c
pMd |SV* |sv_2num |NN SV *const sv
Amb |char* |sv_2pv |NN SV *sv|NULLOK STRLEN *lp
Apmb |char* |sv_2pv |NN SV *sv|NULLOK STRLEN *lp
Apd |char* |sv_2pv_flags |NN SV *const sv|NULLOK STRLEN *const lp|const I32 flags
Apd |char* |sv_2pvutf8 |NN SV *sv|NULLOK STRLEN *const lp
Apd |char* |sv_2pvbyte |NN SV *sv|NULLOK STRLEN *const lp
Ap |char* |sv_pvn_nomg |NN SV* sv|NULLOK STRLEN* lp
Amb |UV |sv_2uv |NN SV *sv
Apmb |UV |sv_2uv |NN SV *sv
Apd |UV |sv_2uv_flags |NN SV *const sv|const I32 flags
Apd |IV |sv_iv |NN SV* sv
Apd |UV |sv_uv |NN SV* sv
Expand All @@ -1388,8 +1391,8 @@ Afpd |void |sv_catpvf |NN SV *const sv|NN const char *const pat|...
Apd |void |sv_vcatpvf |NN SV *const sv|NN const char *const pat \
|NULLOK va_list *const args
Apd |void |sv_catpv |NN SV *const sv|NULLOK const char* ptr
Amdb |void |sv_catpvn |NN SV *dsv|NN const char *sstr|STRLEN len
Amdb |void |sv_catsv |NN SV *dstr|NULLOK SV *sstr
Apmdb |void |sv_catpvn |NN SV *dsv|NN const char *sstr|STRLEN len
Apmdb |void |sv_catsv |NN SV *dstr|NULLOK SV *sstr
Apd |void |sv_chop |NN SV *const sv|NULLOK const char *const ptr
: Used only in perl.c
pd |I32 |sv_clean_all
Expand Down Expand Up @@ -1433,7 +1436,7 @@ Apd |char* |sv_gets |NN SV *const sv|NN PerlIO *const fp|I32 append
Apd |char* |sv_grow |NN SV *const sv|STRLEN newlen
Apd |void |sv_inc |NULLOK SV *const sv
Apd |void |sv_inc_nomg |NULLOK SV *const sv
Amdb |void |sv_insert |NN SV *const bigstr|const STRLEN offset \
Apmdb |void |sv_insert |NN SV *const bigstr|const STRLEN offset \
|const STRLEN len|NN const char *const little \
|const STRLEN littlelen
Apd |void |sv_insert_flags|NN SV *const bigstr|const STRLEN offset|const STRLEN len \
Expand Down Expand Up @@ -1464,7 +1467,7 @@ Apd |STRLEN |sv_pos_u2b_flags|NN SV *const sv|STRLEN uoffset \
Apd |void |sv_pos_b2u |NULLOK SV *const sv|NN I32 *const offsetp
Apd |STRLEN |sv_pos_b2u_flags|NN SV *const sv|STRLEN const offset \
|U32 flags
Amdb |char* |sv_pvn_force |NN SV* sv|NULLOK STRLEN* lp
Apmdb |char* |sv_pvn_force |NN SV* sv|NULLOK STRLEN* lp
Apd |char* |sv_pvutf8n_force|NN SV *const sv|NULLOK STRLEN *const lp
Apd |char* |sv_pvbyten_force|NN SV *const sv|NULLOK STRLEN *const lp
Apd |char* |sv_recode_to_utf8 |NN SV* sv|NN SV *encoding
Expand Down Expand Up @@ -1493,8 +1496,8 @@ Apd |SV* |sv_setref_pvn |NN SV *const rv|NULLOK const char *const classname \
Apd |void |sv_setpv |NN SV *const sv|NULLOK const char *const ptr
Apd |void |sv_setpvn |NN SV *const sv|NULLOK const char *const ptr|const STRLEN len
Xp |void |sv_sethek |NN SV *const sv|NULLOK const HEK *const hek
Amdb |void |sv_setsv |NN SV *dstr|NULLOK SV *sstr
Amdb |void |sv_taint |NN SV* sv
Apmdb |void |sv_setsv |NN SV *dstr|NULLOK SV *sstr
Apmdb |void |sv_taint |NN SV* sv
ApdR |bool |sv_tainted |NN SV *const sv
Apd |int |sv_unmagic |NN SV *const sv|const int type
Apd |int |sv_unmagicext |NN SV *const sv|const int type|NULLOK MGVTBL *vtbl
Expand Down Expand Up @@ -1607,16 +1610,16 @@ s |UV |_to_utf8_case |const UV uv1 \
|NN const char *normal \
|NULLOK const char *special
#endif
Abmd |UV |to_utf8_lower |NN const U8 *p|NN U8* ustrp|NULLOK STRLEN *lenp
Apbmd |UV |to_utf8_lower |NN const U8 *p|NN U8* ustrp|NULLOK STRLEN *lenp
AMp |UV |_to_utf8_lower_flags |NN const U8 *p|NN U8* ustrp \
|NULLOK STRLEN *lenp|bool flags
Abmd |UV |to_utf8_upper |NN const U8 *p|NN U8* ustrp|NULLOK STRLEN *lenp
Apbmd |UV |to_utf8_upper |NN const U8 *p|NN U8* ustrp|NULLOK STRLEN *lenp
AMp |UV |_to_utf8_upper_flags |NN const U8 *p|NN U8* ustrp \
|NULLOK STRLEN *lenp|bool flags
Abmd |UV |to_utf8_title |NN const U8 *p|NN U8* ustrp|NULLOK STRLEN *lenp
Apbmd |UV |to_utf8_title |NN const U8 *p|NN U8* ustrp|NULLOK STRLEN *lenp
AMp |UV |_to_utf8_title_flags |NN const U8 *p|NN U8* ustrp \
|NULLOK STRLEN *lenp|bool flags
Abmd |UV |to_utf8_fold |NN const U8 *p|NN U8* ustrp|NULLOK STRLEN *lenp
Apbmd |UV |to_utf8_fold |NN const U8 *p|NN U8* ustrp|NULLOK STRLEN *lenp
AMp |UV |_to_utf8_fold_flags|NN const U8 *p|NN U8* ustrp \
|NULLOK STRLEN *lenp|U8 flags
#if defined(PERL_IN_MG_C) || defined(PERL_IN_PP_C)
Expand Down Expand Up @@ -1802,10 +1805,10 @@ Ap |void |reginitcolors
ApdRmb |char* |sv_2pv_nolen |NN SV* sv
ApdRmb |char* |sv_2pvutf8_nolen|NN SV* sv
ApdRmb |char* |sv_2pvbyte_nolen|NN SV* sv
AmdbR |char* |sv_pv |NN SV *sv
AmdbR |char* |sv_pvutf8 |NN SV *sv
AmdbR |char* |sv_pvbyte |NN SV *sv
Amdb |STRLEN |sv_utf8_upgrade|NN SV *sv
ApmdbR |char* |sv_pv |NN SV *sv
ApmdbR |char* |sv_pvutf8 |NN SV *sv
ApmdbR |char* |sv_pvbyte |NN SV *sv
Apmdb |STRLEN |sv_utf8_upgrade|NN SV *sv
Amd |STRLEN |sv_utf8_upgrade_nomg|NN SV *sv
ApdM |bool |sv_utf8_downgrade|NN SV *const sv|const bool fail_ok
Apd |void |sv_utf8_encode |NN SV *const sv
Expand Down
2 changes: 1 addition & 1 deletion makedef.pl
Expand Up @@ -701,7 +701,7 @@ sub readvar {
# mean "don't export"
next if $seen{$func}++;
# Should we also skip adding the Perl_ prefix if $flags =~ /o/ ?
$func = "Perl_$func" if ($flags =~ /[pbX]/ && $func !~ /^Perl_/);
$func = "Perl_$func" if ($flags =~ /[pX]/ && $func !~ /^Perl_/);
++$export{$func} unless exists $skip{$func};
}
}
Expand Down
2 changes: 1 addition & 1 deletion regen/embed.pl
Expand Up @@ -45,7 +45,7 @@ ($$)
my ($func, $flags) = @_;

return "S_$func" if $flags =~ /[si]/;
return "Perl_$func" if $flags =~ /[bp]/;
return "Perl_$func" if $flags =~ /p/;
return $func;
}

Expand Down

0 comments on commit 5ff52e3

Please sign in to comment.