From 71f3329806fae31822cf929dfca5104ed768a66d Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Sat, 19 Jul 2025 08:32:48 -0600 Subject: [PATCH] embed.fnc: Need p flag for non-static public elements If a function or macro 'foo' is publicly accessible, there should be a 'Perl_foo' form available for callers to use so as to avoid any name collisions with their own names. Now that we can automatically generate Perl_foo equivalents for macros, make sure that the flags indicate that. I first thought to add the p flag automatically, but that would require a bunch of restructuring. By requiring the flag, in embed.fnc, the true state of things doesn't get hidden. --- embed.fnc | 97 ++++++++++++++++++++++++++------------------------ embed.h | 81 +++++++++++++++++++++++++++++++++++++++++ proto.h | 86 ++++++++++++++++++++++---------------------- regen/embed.pl | 9 +++++ 4 files changed, 184 insertions(+), 89 deletions(-) diff --git a/embed.fnc b/embed.fnc index 061923862b11..58d1f8ab123e 100644 --- a/embed.fnc +++ b/embed.fnc @@ -99,6 +99,9 @@ : placed in perlapi. If no documentation exists, that fact is also : noted in perlapi. : +: These require one of the /[iIpS]/ flags to give callers a name to use +: that won't possibly collide with their own +: : The 'C' flag is used instead for functions and their short names that need to : be accessible everywhere, typically because they are called from a : publicly available macro or inline function, but they are not for @@ -106,7 +109,8 @@ : perlintern. If no documentation exists, that fact is also noted in : perlintern. : -: These really need the 'p' flag to avoid name space collisions. +: These require one of the /[iIpS]/ flags to give callers a name to use +: that won't possibly collide with their own : : Some of these have been constructed so that the wrapper macro names : begin with an underscore to lessen the chances of a name collision. @@ -278,8 +282,8 @@ : The remainder of these introductory comments detail all the possible flags: : : 'A' Both long and short names are accessible fully everywhere (usually -: part of the public API). If the function is not part of the public -: API, instead use 'C', 'E', or 'X'. +: part of the public API). Requires one of /[iIpS]/ flags. If the +: function is not part of the public API, instead use 'C', 'E', or 'X'. : : * adds entry to the list of symbols available on all platforms unless : 'e' or 'm' are also specified; @@ -335,6 +339,7 @@ : for example. Some functions have to be accessible everywhere even if : they are not intended for public use. An example is helper functions : that are called from inline ones that are publicly available. +: Requires one of /[iIpS]/ flags. : : * add entry to the list of symbols available on all platforms unless e : or m are also specified; @@ -1204,7 +1209,7 @@ Cip |I32 |foldEQ_latin1 |NN const char *a \ Adip |I32 |foldEQ_locale |NN const char *a \ |NN const char *b \ |I32 len -Adm |I32 |foldEQ_utf8 |NN const char *s1 \ +Admp |I32 |foldEQ_utf8 |NN const char *s1 \ |NULLOK char **pe1 \ |UV l1 \ |bool u1 \ @@ -1342,11 +1347,11 @@ Adp |GV * |gv_fetchfile_flags \ |NN const char * const name \ |const STRLEN len \ |const U32 flags -Adm |GV * |gv_fetchmeth |NULLOK NOCHECK HV *stash \ +Admp |GV * |gv_fetchmeth |NULLOK NOCHECK HV *stash \ |NN const char *name \ |STRLEN len \ |I32 level -Adm |GV * |gv_fetchmeth_autoload \ +Admp |GV * |gv_fetchmeth_autoload \ |NULLOK NOCHECK HV *stash \ |NN const char *name \ |STRLEN len \ @@ -1422,7 +1427,7 @@ Adp |void |gv_fullname4 |NN SV *sv \ CRdp |CV * |gv_handler |NULLOK HV *stash \ |I32 id Admp |GV * |gv_HVadd |NULLOK GV *gv -Adm |void |gv_init |NN GV *gv \ +Admp |void |gv_init |NN GV *gv \ |NULLOK HV *stash \ |NN const char *name \ |STRLEN len \ @@ -1578,19 +1583,19 @@ Ampx |SV ** |hv_store_flags |NULLOK HV *hv \ |NULLOK SV *val \ |U32 hash \ |int flags -Adm |SV ** |hv_stores |NULLOK HV *hv \ +Admp |SV ** |hv_stores |NULLOK HV *hv \ |"key" \ |NULLOK SV *val -Adm |void |hv_undef |NULLOK HV *hv +Admp |void |hv_undef |NULLOK HV *hv Xop |void |hv_undef_flags |NULLOK HV *hv \ |U32 flags -APdm |I32 |ibcmp |NN const char *a \ +APdmp |I32 |ibcmp |NN const char *a \ |NN const char *b \ |I32 len -APdm |I32 |ibcmp_locale |NN const char *a \ +APdmp |I32 |ibcmp_locale |NN const char *a \ |NN const char *b \ |I32 len -Adm |I32 |ibcmp_utf8 |NN const char *s1 \ +Admp |I32 |ibcmp_utf8 |NN const char *s1 \ |NULLOK char **pe1 \ |UV l1 \ |bool u1 \ @@ -1637,10 +1642,10 @@ p |bool |io_close |NN IO *io \ ARTdip |Size_t |isC9_STRICT_UTF8_CHAR \ |NN const U8 * const s0 \ |NN const U8 * const e -ARTdm |bool |is_c9strict_utf8_string \ +ARTdmp |bool |is_c9strict_utf8_string \ |NN const U8 *s \ |STRLEN len -ATdm |bool |is_c9strict_utf8_string_loc \ +ATdmp |bool |is_c9strict_utf8_string_loc \ |NN const U8 *s \ |STRLEN len \ |NN const U8 **ep @@ -1664,10 +1669,10 @@ ARdip |bool |is_safe_syscall|NN const char *pv \ ARTdip |Size_t |isSTRICT_UTF8_CHAR \ |NN const U8 * const s0 \ |NN const U8 * const e -ARTdm |bool |is_strict_utf8_string \ +ARTdmp |bool |is_strict_utf8_string \ |NN const U8 *s \ |STRLEN len -ATdm |bool |is_strict_utf8_string_loc \ +ATdmp |bool |is_strict_utf8_string_loc \ |NN const U8 *s \ |STRLEN len \ |NN const U8 **ep @@ -1699,11 +1704,11 @@ CPRTp |Size_t |is_utf8_FF_helper_ \ |NN const U8 * const s0 \ |NN const U8 * const e \ |const bool require_partial -ATdm |bool |is_utf8_fixed_width_buf_flags \ +ATdmp |bool |is_utf8_fixed_width_buf_flags \ |NN const U8 * const s \ |STRLEN len \ |const U32 flags -ATdm |bool |is_utf8_fixed_width_buf_loc_flags \ +ATdmp |bool |is_utf8_fixed_width_buf_loc_flags \ |NN const U8 * const s \ |STRLEN len \ |NULLOK const U8 **ep \ @@ -1727,7 +1732,7 @@ CRp |bool |_is_utf8_perl_idcont \ CRp |bool |_is_utf8_perl_idstart \ |NN const U8 *p \ |NN const U8 * const e -ARTdm |bool |is_utf8_string |NN const U8 *s \ +ARTdmp |bool |is_utf8_string |NN const U8 *s \ |STRLEN len ARTdip |bool |is_utf8_string_flags \ |NN const U8 *s \ @@ -1737,7 +1742,7 @@ ATdmp |bool |is_utf8_string_loc \ |NN const U8 *s \ |const STRLEN len \ |NN const U8 **ep -ATdm |bool |is_utf8_string_loc_flags \ +ATdmp |bool |is_utf8_string_loc_flags \ |NN const U8 *s \ |STRLEN len \ |NN const U8 **ep \ @@ -1753,7 +1758,7 @@ ATdip |bool |is_utf8_string_loclen_flags \ |NULLOK const U8 **ep \ |NULLOK STRLEN *el \ |const U32 flags -APTdm |bool |is_utf8_valid_partial_char \ +APTdmp |bool |is_utf8_valid_partial_char \ |NN const U8 * const s0 \ |NN const U8 * const e ARTdip |bool |is_utf8_valid_partial_char_flags \ @@ -2145,7 +2150,7 @@ ARdp |OP * |newASSIGNOP |I32 flags \ |NULLOK OP *left \ |I32 optype \ |NULLOK OP *right -Adm |CV * |newATTRSUB |I32 floor \ +Admp |CV * |newATTRSUB |I32 floor \ |NULLOK OP *o \ |NULLOK OP *proto \ |NULLOK OP *attrs \ @@ -2157,11 +2162,11 @@ Xdp |CV * |newATTRSUB_x |I32 floor \ |NULLOK OP *block \ |bool o_is_gv ARdmp |AV * |newAV -ARdm |AV * |newAV_alloc_x |SSize_t size -ARdm |AV * |newAV_alloc_xz |SSize_t size +ARdmp |AV * |newAV_alloc_x |SSize_t size +ARdmp |AV * |newAV_alloc_xz |SSize_t size ARdp |AV * |newAVav |NULLOK AV *oav ARdp |AV * |newAVhv |NULLOK HV *ohv -ARdm |AV * |newAV_mortal +ARdmp |AV * |newAV_mortal ARdp |OP * |newAVREF |NN OP *o ARdp |OP * |newBINOP |I32 type \ |I32 flags \ @@ -2198,7 +2203,7 @@ ARdp |OP * |newGIVENOP |NN OP *cond \ |PADOFFSET defsv_off : Used in scope.c eopx |GP * |newGP |NN GV * const gv -Adm |GV * |newGVgen |NN const char *pack +Admp |GV * |newGVgen |NN const char *pack ARdp |GV * |newGVgen_flags |NN const char *pack \ |U32 flags ARdp |OP * |newGVOP |I32 type \ @@ -2317,7 +2322,7 @@ Adp |SV * |newSVrv |NN SV * const rv \ ARdmp |SV * |newSVsv |NULLOK SV * const old ARdp |SV * |newSVsv_flags |NULLOK SV * const old \ |I32 flags -ARdm |SV * |newSVsv_nomg |NULLOK SV * const old +ARdmp |SV * |newSVsv_nomg |NULLOK SV * const old ARdp |SV * |newSV_true ARdip |SV * |newSV_type |const svtype type AIRdp |SV * |newSV_type_mortal \ @@ -2409,7 +2414,7 @@ Adfp |void |opdump_printf |NN struct Perl_OpDumpContext *ctx \ Adp |OP * |op_force_list |NULLOK OP *o Adp |void |op_free |NULLOK OP *arg Adp |OP * |op_linklist |NN OP *o -Admx |OP * |op_lvalue |NULLOK OP *o \ +Admpx |OP * |op_lvalue |NULLOK OP *o \ |I32 type Xop |OP * |op_lvalue_flags|NULLOK OP *o \ |I32 type \ @@ -2563,7 +2568,7 @@ CTp |Signal_t|perly_sighandler \ |NULLOK void *uap \ |bool safe -Adm |const char * const|phase_name \ +Admp |const char * const|phase_name \ |enum perl_phase Adp |void |pmop_dump |NULLOK PMOP *pm : Used in perly.y @@ -2797,9 +2802,9 @@ p |void |report_wrongway_fh \ AOdp |void |require_pv |NN const char *pv Cop |void |resume_compcv |NN struct suspended_compcv *buffer \ |bool save -Adm |void |resume_compcv_and_save \ +Admp |void |resume_compcv_and_save \ |NN struct suspended_compcv *buffer -Adm |void |resume_compcv_final \ +Admp |void |resume_compcv_final \ |NN struct suspended_compcv *buffer APTdp |char * |rninstr |NN const char *big \ |NN const char *bigend \ @@ -2891,7 +2896,7 @@ ARTdp |Malloc_t|safesysrealloc|Malloc_t where \ |MEM_SIZE nbytes Cdp |void |save_adelete |NN AV *av \ |SSize_t key -Adm |void |save_aelem |NN AV *av \ +Admp |void |save_aelem |NN AV *av \ |SSize_t idx \ |NN SV **sptr Adp |void |save_aelem_flags \ @@ -2927,7 +2932,7 @@ Adp |void |save_gp |NN GV *gv \ Adhp |HV * |save_hash |NN GV *gv Cdp |void |save_hdelete |NN HV *hv \ |NN SV *keysv -Adm |void |save_helem |NN HV *hv \ +Admp |void |save_helem |NN HV *hv \ |NN SV *key \ |NN SV **sptr Adp |void |save_helem_flags \ @@ -3157,7 +3162,7 @@ Admp |void |sv_copypv |NN SV * const dsv \ Adp |void |sv_copypv_flags|NN SV * const dsv \ |NN SV * const ssv \ |const I32 flags -Adm |void |sv_copypv_nomg |NN SV * const dsv \ +Admp |void |sv_copypv_nomg |NN SV * const dsv \ |NN SV * const ssv Adp |CV * |sv_2cv |NULLOK SV *sv \ |NN HV ** const st \ @@ -3278,7 +3283,7 @@ Cdp |SV * |sv_newref |NULLOK SV * const sv Adp |void |sv_nosharing |NULLOK SV *sv : Used in pp.c, pp_hot.c, sv.c dpx |SV * |sv_2num |NN SV * const sv -Adm |bool |sv_numeq |NULLOK SV *sv1 \ +Admp |bool |sv_numeq |NULLOK SV *sv1 \ |NULLOK SV *sv2 Adp |bool |sv_numeq_flags |NULLOK SV *sv1 \ |NULLOK SV *sv2 \ @@ -3360,7 +3365,7 @@ AMdip |void |SvREFCNT_dec |NULLOK SV *sv AMdip |void |SvREFCNT_dec_NN|NN SV *sv Adip |SV * |SvREFCNT_dec_ret_NULL \ |NULLOK SV *sv -Adm |void |SvREFCNT_dec_set_NULL \ +Admp |void |SvREFCNT_dec_set_NULL \ |NULLOK SV *sv AMTdip |SV * |SvREFCNT_inc |NULLOK SV *sv AMTdip |SV * |SvREFCNT_inc_NN|NN SV *sv @@ -3466,7 +3471,7 @@ Adp |void |sv_setuv |NN SV * const sv \ |const UV num Adp |void |sv_setuv_mg |NN SV * const sv \ |const UV u -Adm |bool |sv_streq |NULLOK SV *sv1 \ +Admp |bool |sv_streq |NULLOK SV *sv1 \ |NULLOK SV *sv2 Adp |bool |sv_streq_flags |NULLOK SV *sv1 \ |NULLOK SV *sv2 \ @@ -3526,19 +3531,19 @@ Adp |bool |sv_utf8_downgrade_flags \ |NN SV * const sv \ |const bool fail_ok \ |const U32 flags -Adm |bool |sv_utf8_downgrade_nomg \ +Admp |bool |sv_utf8_downgrade_nomg \ |NN SV * const sv \ |const bool fail_ok Adp |void |sv_utf8_encode |NN SV * const sv Admp |STRLEN |sv_utf8_upgrade|NN SV *sv -Adm |STRLEN |sv_utf8_upgrade_flags \ +Admp |STRLEN |sv_utf8_upgrade_flags \ |NN SV * const sv \ |const I32 flags Adp |STRLEN |sv_utf8_upgrade_flags_grow \ |NN SV * const sv \ |const I32 flags \ |STRLEN extra -Adm |STRLEN |sv_utf8_upgrade_nomg \ +Admp |STRLEN |sv_utf8_upgrade_nomg \ |NN SV *sv Adip |UV |SvUV |NN SV *sv Cmp |UV |sv_2uv |NN SV *sv @@ -3606,7 +3611,7 @@ Fpv |OP * |tied_method |NN SV *methname \ |... Xp |SSize_t|tmps_grow_p |SSize_t ix Xiop |Stack_off_t|TOPMARK -Cm |UV |to_uni_fold |UV c \ +Cmp |UV |to_uni_fold |UV c \ |NN U8 *p \ |NN STRLEN *lenp Cp |UV |_to_uni_fold_flags \ @@ -3814,13 +3819,13 @@ p |void |utilize |int aver \ |NN OP *idop \ |NULLOK OP *arg -Adm |U8 * |uvchr_to_utf8 |NN U8 *d \ +Admp |U8 * |uvchr_to_utf8 |NN U8 *d \ |UV uv -Adm |U8 * |uvchr_to_utf8_flags \ +Admp |U8 * |uvchr_to_utf8_flags \ |NN U8 *d \ |UV uv \ |UV flags -Adm |U8 * |uvchr_to_utf8_flags_msgs \ +Admp |U8 * |uvchr_to_utf8_flags_msgs \ |NN U8 *d \ |UV uv \ |UV flags \ @@ -3911,7 +3916,7 @@ Adp |void |warn_sv |NN SV *baseex RXop |I32 |was_lvalue_sub : FIXME p |void |watch |NN char **addr -Adm |I32 |whichsig |NN const char *sig +Admp |I32 |whichsig |NN const char *sig Adp |I32 |whichsig_pv |NN const char *sig Adp |I32 |whichsig_pvn |NN const char *sig \ |STRLEN len @@ -6373,7 +6378,7 @@ p |void |op_relocate_sv |NN SV **svp \ |NN PADOFFSET *targp # endif #else /* if !defined(USE_ITHREADS) */ -Adm |void |CopFILEGV_set |NN COP *c \ +Admp |void |CopFILEGV_set |NN COP *c \ |NN GV *gv #endif #if defined(USE_LOCALE_COLLATE) diff --git a/embed.h b/embed.h index 92ea88e657db..22f0c39fed85 100644 --- a/embed.h +++ b/embed.h @@ -318,20 +318,29 @@ # define isSTRICT_UTF8_CHAR Perl_isSTRICT_UTF8_CHAR # define isUTF8_CHAR Perl_isUTF8_CHAR # define isUTF8_CHAR_flags Perl_isUTF8_CHAR_flags +# define Perl_is_c9strict_utf8_string is_c9strict_utf8_string +# define Perl_is_c9strict_utf8_string_loc is_c9strict_utf8_string_loc # define is_c9strict_utf8_string_loclen Perl_is_c9strict_utf8_string_loclen # define is_in_locale_category_(a,b) Perl_is_in_locale_category_(aTHX_ a,b) # define is_lvalue_sub() Perl_is_lvalue_sub(aTHX) # define is_safe_syscall(a,b,c,d) Perl_is_safe_syscall(aTHX_ a,b,c,d) +# define Perl_is_strict_utf8_string is_strict_utf8_string +# define Perl_is_strict_utf8_string_loc is_strict_utf8_string_loc # define is_strict_utf8_string_loclen Perl_is_strict_utf8_string_loclen # define is_utf8_FF_helper_ Perl_is_utf8_FF_helper_ # define Perl_is_utf8_char_buf is_utf8_char_buf # define is_utf8_char_helper_ Perl_is_utf8_char_helper_ +# define Perl_is_utf8_fixed_width_buf_flags is_utf8_fixed_width_buf_flags +# define Perl_is_utf8_fixed_width_buf_loc_flags is_utf8_fixed_width_buf_loc_flags # define is_utf8_fixed_width_buf_loclen_flags Perl_is_utf8_fixed_width_buf_loclen_flags # define is_utf8_invariant_string_loc Perl_is_utf8_invariant_string_loc +# define Perl_is_utf8_string is_utf8_string # define is_utf8_string_flags Perl_is_utf8_string_flags # define Perl_is_utf8_string_loc is_utf8_string_loc +# define Perl_is_utf8_string_loc_flags is_utf8_string_loc_flags # define is_utf8_string_loclen Perl_is_utf8_string_loclen # define is_utf8_string_loclen_flags Perl_is_utf8_string_loclen_flags +# define Perl_is_utf8_valid_partial_char is_utf8_valid_partial_char # define is_utf8_valid_partial_char_flags Perl_is_utf8_valid_partial_char_flags # define isinfnan Perl_isinfnan # define leave_adjust_stacks(a,b,c,d) Perl_leave_adjust_stacks(aTHX_ a,b,c,d) @@ -2271,13 +2280,18 @@ # define PerlIO_write(a,b,c) Perl_PerlIO_write(aTHX_ a,b,c) # endif /* defined(USE_PERLIO) */ # if defined(USE_THREADS) +# define Perl_SvREFCNT_dec_set_NULL(mTHX,a) SvREFCNT_dec_set_NULL(a) # define Perl_do_open(mTHX,a,b,c,d,e,f,g) do_open(a,b,c,d,e,f,g) +# define Perl_foldEQ_utf8(mTHX,a,b,c,d,e,f,g,h) foldEQ_utf8(a,b,c,d,e,f,g,h) # define Perl_gv_AVadd(mTHX,a) gv_AVadd(a) # define Perl_gv_HVadd(mTHX,a) gv_HVadd(a) # define Perl_gv_IOadd(mTHX,a) gv_IOadd(a) # define Perl_gv_efullname3(mTHX,a,b,c) gv_efullname3(a,b,c) +# define Perl_gv_fetchmeth(mTHX,a,b,c,d) gv_fetchmeth(a,b,c,d) +# define Perl_gv_fetchmeth_autoload(mTHX,a,b,c,d) gv_fetchmeth_autoload(a,b,c,d) # define Perl_gv_fetchmethod(mTHX,a,b) gv_fetchmethod(a,b) # define Perl_gv_fullname3(mTHX,a,b,c) gv_fullname3(a,b,c) +# define Perl_gv_init(mTHX,a,b,c,d,e) gv_init(a,b,c,d,e) # define Perl_hv_delete(mTHX,a,b,c,d) hv_delete(a,b,c,d) # define Perl_hv_delete_ent(mTHX,a,b,c,d) hv_delete_ent(a,b,c,d) # define Perl_hv_exists(mTHX,a,b,c) hv_exists(a,b,c) @@ -2289,14 +2303,31 @@ # define Perl_hv_store(mTHX,a,b,c,d,e) hv_store(a,b,c,d,e) # define Perl_hv_store_ent(mTHX,a,b,c,d) hv_store_ent(a,b,c,d) # define Perl_hv_store_flags(mTHX,a,b,c,d,e,f) hv_store_flags(a,b,c,d,e,f) +# define Perl_hv_stores(mTHX,a,b,c) hv_stores(a,b,c) +# define Perl_hv_undef(mTHX,a) hv_undef(a) +# define Perl_ibcmp(mTHX,a,b,c) ibcmp(a,b,c) +# define Perl_ibcmp_locale(mTHX,a,b,c) ibcmp_locale(a,b,c) +# define Perl_ibcmp_utf8(mTHX,a,b,c,d,e,f,g,h) ibcmp_utf8(a,b,c,d,e,f,g,h) +# define Perl_newATTRSUB(mTHX,a,b,c,d,e) newATTRSUB(a,b,c,d,e) # define Perl_newAV(mTHX) newAV() +# define Perl_newAV_alloc_x(mTHX,a) newAV_alloc_x(a) +# define Perl_newAV_alloc_xz(mTHX,a) newAV_alloc_xz(a) +# define Perl_newAV_mortal(mTHX) newAV_mortal() +# define Perl_newGVgen(mTHX,a) newGVgen(a) # define Perl_newHV(mTHX) newHV() # define Perl_newIO(mTHX) newIO() # define Perl_newSUB(mTHX,a,b,c,d) newSUB(a,b,c,d) # define Perl_newSVsv(mTHX,a) newSVsv(a) +# define Perl_newSVsv_nomg(mTHX,a) newSVsv_nomg(a) +# define Perl_op_lvalue(mTHX,a,b) op_lvalue(a,b) +# define Perl_phase_name(mTHX,a) phase_name(a) +# define Perl_resume_compcv_and_save(mTHX,a) resume_compcv_and_save(a) +# define Perl_resume_compcv_final(mTHX,a) resume_compcv_final(a) +# define Perl_save_aelem(mTHX,a,b,c) save_aelem(a,b,c) # define Perl_save_freeop(mTHX,a) save_freeop(a) # define Perl_save_freepv(mTHX,a) save_freepv(a) # define Perl_save_freesv(mTHX,a) save_freesv(a) +# define Perl_save_helem(mTHX,a,b,c) save_helem(a,b,c) # define Perl_save_mortalizesv(mTHX,a) save_mortalizesv(a) # define Perl_save_op(mTHX) save_op() # define Perl_sv_2bool(mTHX,a) sv_2bool(a) @@ -2313,35 +2344,54 @@ # define Perl_sv_catsv(mTHX,a,b) sv_catsv(a,b) # define Perl_sv_catsv_mg(mTHX,a,b) sv_catsv_mg(a,b) # define Perl_sv_copypv(mTHX,a,b) sv_copypv(a,b) +# define Perl_sv_copypv_nomg(mTHX,a,b) sv_copypv_nomg(a,b) # define Perl_sv_eq(mTHX,a,b) sv_eq(a,b) # define Perl_sv_force_normal(mTHX,a) sv_force_normal(a) # define Perl_sv_insert(mTHX,a,b,c,d,e) sv_insert(a,b,c,d,e) # define Perl_sv_mortalcopy(mTHX,a) sv_mortalcopy(a) +# define Perl_sv_numeq(mTHX,a,b) sv_numeq(a,b) # define Perl_sv_pv(mTHX,a) sv_pv(a) # define Perl_sv_pvbyte(mTHX,a) sv_pvbyte(a) # define Perl_sv_pvn_force(mTHX,a,b) sv_pvn_force(a,b) # define Perl_sv_pvutf8(mTHX,a) sv_pvutf8(a) # define Perl_sv_setsv(mTHX,a,b) sv_setsv(a,b) +# define Perl_sv_streq(mTHX,a,b) sv_streq(a,b) # define Perl_sv_taint(mTHX,a) sv_taint(a) # define Perl_sv_unref(mTHX,a) sv_unref(a) # define Perl_sv_usepvn(mTHX,a,b,c) sv_usepvn(a,b,c) # define Perl_sv_usepvn_mg(mTHX,a,b,c) sv_usepvn_mg(a,b,c) # define Perl_sv_utf8_downgrade(mTHX,a,b) sv_utf8_downgrade(a,b) +# define Perl_sv_utf8_downgrade_nomg(mTHX,a,b) sv_utf8_downgrade_nomg(a,b) # define Perl_sv_utf8_upgrade(mTHX,a) sv_utf8_upgrade(a) +# define Perl_sv_utf8_upgrade_flags(mTHX,a,b) sv_utf8_upgrade_flags(a,b) +# define Perl_sv_utf8_upgrade_nomg(mTHX,a) sv_utf8_upgrade_nomg(a) +# define Perl_to_uni_fold(mTHX,a,b,c) to_uni_fold(a,b,c) # define Perl_uv_to_utf8_msgs(mTHX,a,b,c,d) uv_to_utf8_msgs(a,b,c,d) +# define Perl_uvchr_to_utf8(mTHX,a,b) uvchr_to_utf8(a,b) +# define Perl_uvchr_to_utf8_flags(mTHX,a,b,c) uvchr_to_utf8_flags(a,b,c) +# define Perl_uvchr_to_utf8_flags_msgs(mTHX,a,b,c,d) uvchr_to_utf8_flags_msgs(a,b,c,d) +# define Perl_whichsig(mTHX,a) whichsig(a) # define thread_locale_init() Perl_thread_locale_init(aTHX) # define thread_locale_term() Perl_thread_locale_term(aTHX) # if defined(PERL_DONT_CREATE_GVSV) # define Perl_gv_SVadd(mTHX,a) gv_SVadd(a) # endif +# if !defined(USE_ITHREADS) +# define Perl_CopFILEGV_set(mTHX,a,b) CopFILEGV_set(a,b) +# endif # else /* if !defined(USE_THREADS) */ +# define Perl_SvREFCNT_dec_set_NULL SvREFCNT_dec_set_NULL # define Perl_do_open do_open +# define Perl_foldEQ_utf8 foldEQ_utf8 # define Perl_gv_AVadd gv_AVadd # define Perl_gv_HVadd gv_HVadd # define Perl_gv_IOadd gv_IOadd # define Perl_gv_efullname3 gv_efullname3 +# define Perl_gv_fetchmeth gv_fetchmeth +# define Perl_gv_fetchmeth_autoload gv_fetchmeth_autoload # define Perl_gv_fetchmethod gv_fetchmethod # define Perl_gv_fullname3 gv_fullname3 +# define Perl_gv_init gv_init # define Perl_hv_delete hv_delete # define Perl_hv_delete_ent hv_delete_ent # define Perl_hv_exists hv_exists @@ -2353,14 +2403,31 @@ # define Perl_hv_store hv_store # define Perl_hv_store_ent hv_store_ent # define Perl_hv_store_flags hv_store_flags +# define Perl_hv_stores hv_stores +# define Perl_hv_undef hv_undef +# define Perl_ibcmp ibcmp +# define Perl_ibcmp_locale ibcmp_locale +# define Perl_ibcmp_utf8 ibcmp_utf8 +# define Perl_newATTRSUB newATTRSUB # define Perl_newAV newAV +# define Perl_newAV_alloc_x newAV_alloc_x +# define Perl_newAV_alloc_xz newAV_alloc_xz +# define Perl_newAV_mortal newAV_mortal +# define Perl_newGVgen newGVgen # define Perl_newHV newHV # define Perl_newIO newIO # define Perl_newSUB newSUB # define Perl_newSVsv newSVsv +# define Perl_newSVsv_nomg newSVsv_nomg +# define Perl_op_lvalue op_lvalue +# define Perl_phase_name phase_name +# define Perl_resume_compcv_and_save resume_compcv_and_save +# define Perl_resume_compcv_final resume_compcv_final +# define Perl_save_aelem save_aelem # define Perl_save_freeop save_freeop # define Perl_save_freepv save_freepv # define Perl_save_freesv save_freesv +# define Perl_save_helem save_helem # define Perl_save_mortalizesv save_mortalizesv # define Perl_save_op save_op # define Perl_sv_2bool sv_2bool @@ -2377,25 +2444,39 @@ # define Perl_sv_catsv sv_catsv # define Perl_sv_catsv_mg sv_catsv_mg # define Perl_sv_copypv sv_copypv +# define Perl_sv_copypv_nomg sv_copypv_nomg # define Perl_sv_eq sv_eq # define Perl_sv_force_normal sv_force_normal # define Perl_sv_insert sv_insert # define Perl_sv_mortalcopy sv_mortalcopy +# define Perl_sv_numeq sv_numeq # define Perl_sv_pv sv_pv # define Perl_sv_pvbyte sv_pvbyte # define Perl_sv_pvn_force sv_pvn_force # define Perl_sv_pvutf8 sv_pvutf8 # define Perl_sv_setsv sv_setsv +# define Perl_sv_streq sv_streq # define Perl_sv_taint sv_taint # define Perl_sv_unref sv_unref # define Perl_sv_usepvn sv_usepvn # define Perl_sv_usepvn_mg sv_usepvn_mg # define Perl_sv_utf8_downgrade sv_utf8_downgrade +# define Perl_sv_utf8_downgrade_nomg sv_utf8_downgrade_nomg # define Perl_sv_utf8_upgrade sv_utf8_upgrade +# define Perl_sv_utf8_upgrade_flags sv_utf8_upgrade_flags +# define Perl_sv_utf8_upgrade_nomg sv_utf8_upgrade_nomg +# define Perl_to_uni_fold to_uni_fold # define Perl_uv_to_utf8_msgs uv_to_utf8_msgs +# define Perl_uvchr_to_utf8 uvchr_to_utf8 +# define Perl_uvchr_to_utf8_flags uvchr_to_utf8_flags +# define Perl_uvchr_to_utf8_flags_msgs uvchr_to_utf8_flags_msgs +# define Perl_whichsig whichsig # if defined(PERL_DONT_CREATE_GVSV) # define Perl_gv_SVadd gv_SVadd # endif +# if !defined(USE_ITHREADS) +# define Perl_CopFILEGV_set CopFILEGV_set +# endif # endif /* !defined(USE_THREADS) */ # if defined(VMS) || defined(WIN32) # define do_aspawn(a,b,c) Perl_do_aspawn(aTHX_ a,b,c) diff --git a/proto.h b/proto.h index 43bfc8020dcc..a7578ca74d3d 100644 --- a/proto.h +++ b/proto.h @@ -85,7 +85,7 @@ Perl_Slab_Free(pTHX_ void *op); assert(op) /* PERL_CALLCONV void -SvREFCNT_dec_set_NULL(pTHX_ SV *sv); */ +Perl_SvREFCNT_dec_set_NULL(pTHX_ SV *sv); */ PERL_CALLCONV const char * Perl__byte_dump_string(pTHX_ const U8 * const start, const STRLEN len, const bool format); @@ -1169,7 +1169,7 @@ Perl_find_script(pTHX_ const char *scriptname, bool dosearch, const char * const assert(scriptname) /* PERL_CALLCONV I32 -foldEQ_utf8(pTHX_ const char *s1, char **pe1, UV l1, bool u1, const char *s2, char **pe2, UV l2, bool u2); */ +Perl_foldEQ_utf8(pTHX_ const char *s1, char **pe1, UV l1, bool u1, const char *s2, char **pe2, UV l2, bool u2); */ PERL_CALLCONV I32 Perl_foldEQ_utf8_flags(pTHX_ const char *s1, char **pe1, UV l1, bool u1, const char *s2, char **pe2, UV l2, bool u2, U32 flags); @@ -1433,10 +1433,10 @@ Perl_gv_fetchfile_flags(pTHX_ const char * const name, const STRLEN len, const U assert(name) /* PERL_CALLCONV GV * -gv_fetchmeth(pTHX_ HV *stash, const char *name, STRLEN len, I32 level); */ +Perl_gv_fetchmeth(pTHX_ HV *stash, const char *name, STRLEN len, I32 level); */ /* PERL_CALLCONV GV * -gv_fetchmeth_autoload(pTHX_ HV *stash, const char *name, STRLEN len, I32 level); */ +Perl_gv_fetchmeth_autoload(pTHX_ HV *stash, const char *name, STRLEN len, I32 level); */ PERL_CALLCONV GV * Perl_gv_fetchmeth_pv(pTHX_ HV *stash, const char *name, I32 level, U32 flags); @@ -1520,7 +1520,7 @@ Perl_gv_handler(pTHX_ HV *stash, I32 id) #define PERL_ARGS_ASSERT_GV_HANDLER /* PERL_CALLCONV void -gv_init(pTHX_ GV *gv, HV *stash, const char *name, STRLEN len, int multi); */ +Perl_gv_init(pTHX_ GV *gv, HV *stash, const char *name, STRLEN len, int multi); */ PERL_CALLCONV void Perl_gv_init_pv(pTHX_ GV *gv, HV *stash, const char *name, U32 flags); @@ -1781,27 +1781,27 @@ Perl_hv_store_ent(pTHX_ HV *hv, SV *key, SV *val, U32 hash); */ Perl_hv_store_flags(pTHX_ HV *hv, const char *key, I32 klen, SV *val, U32 hash, int flags); */ /* PERL_CALLCONV SV ** -hv_stores(pTHX_ HV *hv, const char * const key, SV *val); */ +Perl_hv_stores(pTHX_ HV *hv, const char * const key, SV *val); */ /* PERL_CALLCONV void -hv_undef(pTHX_ HV *hv); */ +Perl_hv_undef(pTHX_ HV *hv); */ PERL_CALLCONV void Perl_hv_undef_flags(pTHX_ HV *hv, U32 flags); #define PERL_ARGS_ASSERT_HV_UNDEF_FLAGS /* PERL_CALLCONV I32 -ibcmp(pTHX_ const char *a, const char *b, I32 len) +Perl_ibcmp(pTHX_ const char *a, const char *b, I32 len) __attribute__warn_unused_result__ __attribute__pure__; */ /* PERL_CALLCONV I32 -ibcmp_locale(pTHX_ const char *a, const char *b, I32 len) +Perl_ibcmp_locale(pTHX_ const char *a, const char *b, I32 len) __attribute__warn_unused_result__ __attribute__pure__; */ /* PERL_CALLCONV I32 -ibcmp_utf8(pTHX_ const char *s1, char **pe1, UV l1, bool u1, const char *s2, char **pe2, UV l2, bool u2); */ +Perl_ibcmp_utf8(pTHX_ const char *s1, char **pe1, UV l1, bool u1, const char *s2, char **pe2, UV l2, bool u2); */ PERL_CALLCONV STRLEN Perl_infix_plugin_standard(pTHX_ char *operator_ptr, STRLEN operator_len, struct Perl_custom_infix **def); @@ -1881,11 +1881,11 @@ Perl_io_close(pTHX_ IO *io, GV *gv, bool is_explicit, bool warn_on_fail) assert(io) /* PERL_CALLCONV bool -is_c9strict_utf8_string(const U8 *s, STRLEN len) +Perl_is_c9strict_utf8_string(const U8 *s, STRLEN len) __attribute__warn_unused_result__; */ /* PERL_CALLCONV bool -is_c9strict_utf8_string_loc(const U8 *s, STRLEN len, const U8 **ep); */ +Perl_is_c9strict_utf8_string_loc(const U8 *s, STRLEN len, const U8 **ep); */ PERL_CALLCONV bool Perl_is_in_locale_category_(pTHX_ const bool compiling, const int category); @@ -1897,11 +1897,11 @@ Perl_is_lvalue_sub(pTHX) #define PERL_ARGS_ASSERT_IS_LVALUE_SUB /* PERL_CALLCONV bool -is_strict_utf8_string(const U8 *s, STRLEN len) +Perl_is_strict_utf8_string(const U8 *s, STRLEN len) __attribute__warn_unused_result__; */ /* PERL_CALLCONV bool -is_strict_utf8_string_loc(const U8 *s, STRLEN len, const U8 **ep); */ +Perl_is_strict_utf8_string_loc(const U8 *s, STRLEN len, const U8 **ep); */ PERL_CALLCONV Size_t Perl_is_utf8_FF_helper_(const U8 * const s0, const U8 * const e, const bool require_partial) @@ -1921,23 +1921,23 @@ Perl_is_utf8_char_helper_(const U8 * const s, const U8 *e, const U32 flags) assert(s); assert(e) /* PERL_CALLCONV bool -is_utf8_fixed_width_buf_flags(const U8 * const s, STRLEN len, const U32 flags); */ +Perl_is_utf8_fixed_width_buf_flags(const U8 * const s, STRLEN len, const U32 flags); */ /* PERL_CALLCONV bool -is_utf8_fixed_width_buf_loc_flags(const U8 * const s, STRLEN len, const U8 **ep, const U32 flags); */ +Perl_is_utf8_fixed_width_buf_loc_flags(const U8 * const s, STRLEN len, const U8 **ep, const U32 flags); */ /* PERL_CALLCONV bool -is_utf8_string(const U8 *s, STRLEN len) +Perl_is_utf8_string(const U8 *s, STRLEN len) __attribute__warn_unused_result__; */ /* PERL_CALLCONV bool Perl_is_utf8_string_loc(const U8 *s, const STRLEN len, const U8 **ep); */ /* PERL_CALLCONV bool -is_utf8_string_loc_flags(const U8 *s, STRLEN len, const U8 **ep, const U32 flags); */ +Perl_is_utf8_string_loc_flags(const U8 *s, STRLEN len, const U8 **ep, const U32 flags); */ /* PERL_CALLCONV bool -is_utf8_valid_partial_char(const U8 * const s0, const U8 * const e) +Perl_is_utf8_valid_partial_char(const U8 * const s0, const U8 * const e) __attribute__warn_unused_result__ __attribute__pure__; */ @@ -2788,7 +2788,7 @@ Perl_newASSIGNOP(pTHX_ I32 flags, OP *left, I32 optype, OP *right) #define PERL_ARGS_ASSERT_NEWASSIGNOP /* PERL_CALLCONV CV * -newATTRSUB(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, OP *block); */ +Perl_newATTRSUB(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, OP *block); */ PERL_CALLCONV CV * Perl_newATTRSUB_x(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, OP *block, bool o_is_gv); @@ -2805,15 +2805,15 @@ Perl_newAVREF(pTHX_ OP *o) assert(o) /* PERL_CALLCONV AV * -newAV_alloc_x(pTHX_ SSize_t size) +Perl_newAV_alloc_x(pTHX_ SSize_t size) __attribute__warn_unused_result__; */ /* PERL_CALLCONV AV * -newAV_alloc_xz(pTHX_ SSize_t size) +Perl_newAV_alloc_xz(pTHX_ SSize_t size) __attribute__warn_unused_result__; */ /* PERL_CALLCONV AV * -newAV_mortal(pTHX) +Perl_newAV_mortal(pTHX) __attribute__warn_unused_result__; */ PERL_CALLCONV AV * @@ -2894,7 +2894,7 @@ Perl_newGVREF(pTHX_ I32 type, OP *o) #define PERL_ARGS_ASSERT_NEWGVREF /* PERL_CALLCONV GV * -newGVgen(pTHX_ const char *pack); */ +Perl_newGVgen(pTHX_ const char *pack); */ PERL_CALLCONV GV * Perl_newGVgen_flags(pTHX_ const char *pack, U32 flags) @@ -3150,7 +3150,7 @@ Perl_newSVsv_flags(pTHX_ SV * const old, I32 flags) #define PERL_ARGS_ASSERT_NEWSVSV_FLAGS /* PERL_CALLCONV SV * -newSVsv_nomg(pTHX_ SV * const old) +Perl_newSVsv_nomg(pTHX_ SV * const old) __attribute__warn_unused_result__; */ PERL_CALLCONV SV * @@ -3325,7 +3325,7 @@ Perl_op_linklist(pTHX_ OP *o); assert(o) /* PERL_CALLCONV OP * -op_lvalue(pTHX_ OP *o, I32 type); */ +Perl_op_lvalue(pTHX_ OP *o, I32 type); */ PERL_CALLCONV OP * Perl_op_lvalue_flags(pTHX_ OP *o, I32 type, U32 flags); @@ -3606,7 +3606,7 @@ Perl_perly_sighandler(int sig, Siginfo_t *info, void *uap, bool safe); #define PERL_ARGS_ASSERT_PERLY_SIGHANDLER /* PERL_CALLCONV const char * const -phase_name(pTHX_ enum perl_phase); */ +Perl_phase_name(pTHX_ enum perl_phase); */ PERL_CALLCONV void Perl_pmop_dump(pTHX_ PMOP *pm); @@ -3930,10 +3930,10 @@ Perl_resume_compcv(pTHX_ struct suspended_compcv *buffer, bool save); assert(buffer) /* PERL_CALLCONV void -resume_compcv_and_save(pTHX_ struct suspended_compcv *buffer); */ +Perl_resume_compcv_and_save(pTHX_ struct suspended_compcv *buffer); */ /* PERL_CALLCONV void -resume_compcv_final(pTHX_ struct suspended_compcv *buffer); */ +Perl_resume_compcv_final(pTHX_ struct suspended_compcv *buffer); */ PERL_CALLCONV char * Perl_rninstr(const char *big, const char *bigend, const char *little, const char *lend) @@ -4036,7 +4036,7 @@ Perl_save_adelete(pTHX_ AV *av, SSize_t key); assert(av); assert(SvTYPE(av) == SVt_PVAV) /* PERL_CALLCONV void -save_aelem(pTHX_ AV *av, SSize_t idx, SV **sptr); */ +Perl_save_aelem(pTHX_ AV *av, SSize_t idx, SV **sptr); */ PERL_CALLCONV void Perl_save_aelem_flags(pTHX_ AV *av, SSize_t idx, SV **sptr, const U32 flags); @@ -4121,7 +4121,7 @@ Perl_save_hdelete(pTHX_ HV *hv, SV *keysv); assert(hv); assert(keysv); assert(SvTYPE(hv) == SVt_PVHV) /* PERL_CALLCONV void -save_helem(pTHX_ HV *hv, SV *key, SV **sptr); */ +Perl_save_helem(pTHX_ HV *hv, SV *key, SV **sptr); */ PERL_CALLCONV void Perl_save_helem_flags(pTHX_ HV *hv, SV *key, SV **sptr, const U32 flags); @@ -4642,7 +4642,7 @@ Perl_sv_copypv_flags(pTHX_ SV * const dsv, SV * const ssv, const I32 flags); assert(dsv); assert(ssv) /* PERL_CALLCONV void -sv_copypv_nomg(pTHX_ SV * const dsv, SV * const ssv); */ +Perl_sv_copypv_nomg(pTHX_ SV * const dsv, SV * const ssv); */ PERL_CALLCONV void Perl_sv_dec(pTHX_ SV * const sv); @@ -4858,7 +4858,7 @@ Perl_sv_nosharing(pTHX_ SV *sv); #define PERL_ARGS_ASSERT_SV_NOSHARING /* PERL_CALLCONV bool -sv_numeq(pTHX_ SV *sv1, SV *sv2); */ +Perl_sv_numeq(pTHX_ SV *sv1, SV *sv2); */ PERL_CALLCONV bool Perl_sv_numeq_flags(pTHX_ SV *sv1, SV *sv2, const U32 flags); @@ -5134,7 +5134,7 @@ Perl_sv_setuv_mg(pTHX_ SV * const sv, const UV u); assert(sv) /* PERL_CALLCONV bool -sv_streq(pTHX_ SV *sv1, SV *sv2); */ +Perl_sv_streq(pTHX_ SV *sv1, SV *sv2); */ PERL_CALLCONV bool Perl_sv_streq_flags(pTHX_ SV *sv1, SV *sv2, const U32 flags); @@ -5226,7 +5226,7 @@ Perl_sv_utf8_downgrade_flags(pTHX_ SV * const sv, const bool fail_ok, const U32 assert(sv) /* PERL_CALLCONV bool -sv_utf8_downgrade_nomg(pTHX_ SV * const sv, const bool fail_ok); */ +Perl_sv_utf8_downgrade_nomg(pTHX_ SV * const sv, const bool fail_ok); */ PERL_CALLCONV void Perl_sv_utf8_encode(pTHX_ SV * const sv); @@ -5237,7 +5237,7 @@ Perl_sv_utf8_encode(pTHX_ SV * const sv); Perl_sv_utf8_upgrade(pTHX_ SV *sv); */ /* PERL_CALLCONV STRLEN -sv_utf8_upgrade_flags(pTHX_ SV * const sv, const I32 flags); */ +Perl_sv_utf8_upgrade_flags(pTHX_ SV * const sv, const I32 flags); */ PERL_CALLCONV STRLEN Perl_sv_utf8_upgrade_flags_grow(pTHX_ SV * const sv, const I32 flags, STRLEN extra); @@ -5245,7 +5245,7 @@ Perl_sv_utf8_upgrade_flags_grow(pTHX_ SV * const sv, const I32 flags, STRLEN ext assert(sv) /* PERL_CALLCONV STRLEN -sv_utf8_upgrade_nomg(pTHX_ SV *sv); */ +Perl_sv_utf8_upgrade_nomg(pTHX_ SV *sv); */ PERL_CALLCONV void Perl_sv_vcatpvf(pTHX_ SV * const sv, const char * const pat, va_list * const args); @@ -5329,7 +5329,7 @@ Perl_tmps_grow_p(pTHX_ SSize_t ix); #define PERL_ARGS_ASSERT_TMPS_GROW_P /* PERL_CALLCONV UV -to_uni_fold(pTHX_ UV c, U8 *p, STRLEN *lenp); */ +Perl_to_uni_fold(pTHX_ UV c, U8 *p, STRLEN *lenp); */ PERL_CALLCONV UV Perl_to_uni_lower(pTHX_ UV c, U8 *p, STRLEN *lenp); @@ -5456,13 +5456,13 @@ Perl_utilize(pTHX_ int aver, I32 floor, OP *version, OP *idop, OP *arg) Perl_uv_to_utf8_msgs(pTHX_ U8 *d, UV uv, UV flags, HV **msgs); */ /* PERL_CALLCONV U8 * -uvchr_to_utf8(pTHX_ U8 *d, UV uv); */ +Perl_uvchr_to_utf8(pTHX_ U8 *d, UV uv); */ /* PERL_CALLCONV U8 * -uvchr_to_utf8_flags(pTHX_ U8 *d, UV uv, UV flags); */ +Perl_uvchr_to_utf8_flags(pTHX_ U8 *d, UV uv, UV flags); */ /* PERL_CALLCONV U8 * -uvchr_to_utf8_flags_msgs(pTHX_ U8 *d, UV uv, UV flags, HV **msgs); */ +Perl_uvchr_to_utf8_flags_msgs(pTHX_ U8 *d, UV uv, UV flags, HV **msgs); */ PERL_CALLCONV U8 * Perl_uvoffuni_to_utf8_flags(pTHX_ U8 *d, UV uv, UV flags); @@ -5611,7 +5611,7 @@ Perl_watch(pTHX_ char **addr) assert(addr) /* PERL_CALLCONV I32 -whichsig(pTHX_ const char *sig); */ +Perl_whichsig(pTHX_ const char *sig); */ PERL_CALLCONV I32 Perl_whichsig_pv(pTHX_ const char *sig); @@ -10721,7 +10721,7 @@ Perl_op_relocate_sv(pTHX_ SV **svp, PADOFFSET *targp) # endif #else /* if !defined(USE_ITHREADS) */ /* PERL_CALLCONV void -CopFILEGV_set(pTHX_ COP *c, GV *gv); */ +Perl_CopFILEGV_set(pTHX_ COP *c, GV *gv); */ #endif #if defined(USE_LOCALE_COLLATE) diff --git a/regen/embed.pl b/regen/embed.pl index 0e0a056454ee..8430c7d116e6 100755 --- a/regen/embed.pl +++ b/regen/embed.pl @@ -125,6 +125,7 @@ sub generate_proto_h { if ($flags =~ / ( [^ AabCDdEefFGhIiMmNnOoPpRrSsTUuvWXx;] ) /xx) { die_at_end "flag $1 is not legal (for function $plain_func)"; } + my @nonnull; my $args_assert_line = ( $flags !~ /[Gm]/ ); my $has_depth = ( $flags =~ /W/ ); @@ -185,6 +186,14 @@ sub generate_proto_h { $static_inline = $type =~ /^PERL_STATIC(?:_FORCE)?_INLINE/; } else { + + # A publicly accessible non-static element needs to have a Perl_ + # prefix available to call it with (in case of name conflicts). + die_at_end "'$plain_func' requires p flag because has A or C flag" + if $flags !~ /p/ + && $flags =~ /[AC]/ + && $plain_func !~ /[Pp]erl/; + if ($never_returns) { $retval = "PERL_CALLCONV_NO_RET $retval"; }