This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regcomp.c: White-space only
[perl5.git] / embed.fnc
index 347ff70..a68584d 100644 (file)
--- a/embed.fnc
+++ b/embed.fnc
 :
 : The 'name' in any such line must not be the same as any in this file (i.e.,
 : no redundant definitions), and one of the flags on the apidoc lines must be
-: 'm', indicating it is a macro (or similar), and not a function.
+: 'm' or 'y', indicating it is not a function.
 :
 : All but the name field of an apidoc_item line are optional, and if empty,
 : inherits from the controlling plain apidoc line.   The flags field is
 :         into               "#if defined(PERL_CORE) || defined(PERL_EXT)"
 :
 :       To be usable from dynamically loaded extensions, either:
-:        1) it must be static to its containing file ("i" or "s" flag); or
+:        1) it must be static to its containing file ("i" or "S" flag); or
 :         2) be combined with the "X" flag.
 :
 :   e  Not exported
 :      characters, and a warning is raised otherwise.  This flag suppresses
 :      that warning, so that weird things can be documented
 :
-:   n  Has no arguments.  (used only in =for apidoc entries)
+:   n  Has no arguments.  Perhaps a better name would have been '0'. (used only
+:      in =for apidoc entries)
+:
 :      The macro (it can't be a function) is used without any parameters nor
 :      empty parentheses.
 :
 :         any doc entry is marked that it may change.  Also used to suppress
 :        making a perlapi doc entry if it would just be a placeholder.
 :
+:   y  Typedef.  The element names a type rather than being a macro
+:
 : In this file, pointer parameters that must not be passed NULLs should be
 : prefixed with NN.
 :
@@ -635,7 +639,7 @@ Apd |void   |av_push        |NN AV *av|NN SV *val
 EXp    |void   |av_reify       |NN AV *av
 ApdR   |SV*    |av_shift       |NN AV *av
 Apd    |SV**   |av_store       |NN AV *av|SSize_t key|NULLOK SV *val
-AMdRp  |SSize_t|av_top_index   |NN AV *av
+AmdR   |SSize_t|av_top_index   |NN AV *av
 AidRp  |Size_t |av_count       |NN AV *av
 AmdR   |SSize_t|av_tindex      |NN AV *av
 Apd    |void   |av_undef       |NN AV *av
@@ -663,10 +667,10 @@ Apd       |const PERL_CONTEXT *   |caller_cx|I32 level \
                                |NULLOK const PERL_CONTEXT **dbcxp
 : Used in several source files
 pR     |bool   |cando          |Mode_t mode|bool effective|NN const Stat_t* statbufp
-ApRT   |U32    |cast_ulong     |NV f
-ApRT   |I32    |cast_i32       |NV f
-ApRT   |IV     |cast_iv        |NV f
-ApRT   |UV     |cast_uv        |NV f
+CpRT   |U32    |cast_ulong     |NV f
+CpRT   |I32    |cast_i32       |NV f
+CpRT   |IV     |cast_iv        |NV f
+CpRT   |UV     |cast_uv        |NV f
 #if !defined(HAS_TRUNCATE) && !defined(HAS_CHSIZE) && defined(F_FREESP)
 ApR    |I32    |my_chsize      |int fd|Off_t length
 #endif
@@ -698,7 +702,7 @@ AdfTp       |char*  |form_nocontext |NN const char* pat|...
 AdFTp  |void   |load_module_nocontext|U32 flags|NN SV* name|NULLOK SV* ver|...
 AdfTp  |SV*    |mess_nocontext |NN const char* pat|...
 AdfTp  |void   |warn_nocontext |NN const char* pat|...
-AfTp   |void   |warner_nocontext|U32 err|NN const char* pat|...
+AdfTp  |void   |warner_nocontext|U32 err|NN const char* pat|...
 AdfTp  |SV*    |newSVpvf_nocontext|NN const char *const pat|...
 AdfTp  |void   |sv_catpvf_nocontext|NN SV *const sv|NN const char *const pat|...
 AdfTp  |void   |sv_setpvf_nocontext|NN SV *const sv|NN const char *const pat|...
@@ -726,7 +730,7 @@ Apd |void   |cv_undef       |NN CV* cv
 p      |void   |cv_undef_flags |NN CV* cv|U32 flags
 pd     |void   |cv_forget_slab |NULLOK CV *cv
 Ap     |void   |cx_dump        |NN PERL_CONTEXT* cx
-AiMp   |GV *   |CvGV           |NN CV *sv
+AiMpd  |GV *   |CvGV           |NN CV *sv
 AiMTp  |I32 *  |CvDEPTH        |NN const CV * const sv
 Aphd   |SV*    |filter_add     |NULLOK filter_t funcp|NULLOK SV* datasv
 Ap     |void   |filter_del     |NN filter_t funcp
@@ -970,7 +974,7 @@ Apx |GV*    |gv_fetchmethod_pv_flags|NN HV* stash|NN const char* name \
                                |U32 flags
 Apx    |GV*    |gv_fetchmethod_pvn_flags|NN HV* stash|NN const char* name \
                                |const STRLEN len|U32 flags
-A    |GV*    |gv_fetchpv     |NN const char *nambeg|I32 flags|const svtype sv_type
+Adp    |GV*    |gv_fetchpv     |NN const char *nambeg|I32 flags|const svtype sv_type
 AbpD   |void   |gv_fullname    |NN SV* sv|NN const GV* gv
 ApMb   |void   |gv_fullname3   |NN SV* sv|NN const GV* gv|NULLOK const char* prefix
 Ap     |void   |gv_fullname4   |NN SV* sv|NN const GV* gv|NULLOK const char* prefix|bool keepmain
@@ -1245,7 +1249,7 @@ S |OP*    |listkids       |NULLOK OP* o
 #endif
 p      |OP*    |list           |NULLOK OP* o
 AFpd   |void   |load_module|U32 flags|NN SV* name|NULLOK SV* ver|...
-A    |void   |vload_module|U32 flags|NN SV* name|NULLOK SV* ver|NULLOK va_list* args
+Adp    |void   |vload_module|U32 flags|NN SV* name|NULLOK SV* ver|NULLOK va_list* args
 : Used in perly.y
 p      |OP*    |localize       |NN OP *o|I32 lex
 ApdR   |I32    |looks_like_number|NN SV *const sv
@@ -1369,7 +1373,7 @@ ApdD      |U32    |mg_length      |NN SV* sv
 ApdT   |void   |mg_magical     |NN SV* sv
 Apd    |int    |mg_set         |NN SV* sv
 Ap     |I32    |mg_size        |NN SV* sv
-ApT    |void   |mini_mktime    |NN struct tm *ptm
+AdpT   |void   |mini_mktime    |NN struct tm *ptm
 Axmd   |OP*    |op_lvalue      |NULLOK OP* o|I32 type
 poX    |OP*    |op_lvalue_flags|NULLOK OP* o|I32 type|U32 flags
 pd     |void   |finalize_optree                |NN OP* o
@@ -1383,7 +1387,7 @@ S |void   |move_proto_attr|NN OP **proto|NN OP **attrs \
 : Used in op.c and pp_sys.c
 p      |int    |mode_from_discipline|NULLOK const char* s|STRLEN len
 Ap     |const char*    |moreswitches   |NN const char* s
-Ap     |NV     |my_atof        |NN const char *s
+Apd    |NV     |my_atof        |NN const char *s
 ATdpR  |NV     |my_strtod      |NN const char * const s|NULLOK char ** e
 Aprd   |void   |my_exit        |U32 status
 Apr    |void   |my_failure_exit
@@ -1431,7 +1435,7 @@ Ap        |void   |newPROG        |NN OP* o
 ApdR   |OP*    |newRANGE       |I32 flags|NN OP* left|NN OP* right
 ApdR   |OP*    |newSLICEOP     |I32 flags|NULLOK OP* subscript|NULLOK OP* listop
 ApdR   |OP*    |newSTATEOP     |I32 flags|NULLOK char* label|NULLOK OP* o
-ApbM   |CV*    |newSUB         |I32 floor|NULLOK OP* o|NULLOK OP* proto \
+AdpbM  |CV*    |newSUB         |I32 floor|NULLOK OP* o|NULLOK OP* proto \
                                |NULLOK OP* block
 pd     |CV *   |newXS_len_flags|NULLOK const char *name|STRLEN len \
                                |NN XSUBADDR_t subaddr\
@@ -1759,7 +1763,7 @@ Apd       |NV     |sv_2nv_flags   |NN SV *const sv|const I32 flags
 : Used in pp.c, pp_hot.c, sv.c
 pxd    |SV*    |sv_2num        |NN SV *const sv
 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_2pv_flags   |NN SV *const sv|NULLOK STRLEN *const lp|const U32 flags
 ApdMb  |char*  |sv_2pvutf8     |NN SV *sv|NULLOK STRLEN *const lp
 Ap     |char*  |sv_2pvutf8_flags       |NN SV *sv|NULLOK STRLEN *const lp|const U32 flags
 ApdMb  |char*  |sv_2pvbyte     |NN SV *sv|NULLOK STRLEN *const lp
@@ -1916,22 +1920,22 @@ Apd     |void   |sv_vcatpvfn_flags|NN SV *const sv|NN const char *const pat|const STRL
 Apd    |void   |sv_vsetpvfn    |NN SV *const sv|NN const char *const pat|const STRLEN patlen \
                                |NULLOK va_list *const args|NULLOK SV **const svargs \
                                |const Size_t sv_count|NULLOK bool *const maybe_tainted
-ApR    |NV     |str_to_version |NN SV *sv
+CpR    |NV     |str_to_version |NN SV *sv
 Ap     |void   |regdump        |NN const regexp* r
 CiTop  |struct regexp *|ReANY  |NN const REGEXP * const re
-Ap     |I32    |pregexec       |NN REGEXP * const prog|NN char* stringarg \
+Apdh   |I32    |pregexec       |NN REGEXP * const prog|NN char* stringarg \
                                |NN char* strend|NN char* strbeg \
                                |SSize_t minend |NN SV* screamer|U32 nosave
 Ap     |void   |pregfree       |NULLOK REGEXP* r
-Ap     |void   |pregfree2      |NN REGEXP *rx
+Cp     |void   |pregfree2      |NN REGEXP *rx
 : FIXME - is anything in re using this now?
 EXp    |REGEXP*|reg_temp_copy  |NULLOK REGEXP* dsv|NN REGEXP* ssv
-Ap     |void   |regfree_internal|NN REGEXP *const rx
+Cp     |void   |regfree_internal|NN REGEXP *const rx
 #if defined(USE_ITHREADS)
-Ap     |void*  |regdupe_internal|NN REGEXP * const r|NN CLONE_PARAMS* param
+Cp     |void*  |regdupe_internal|NN REGEXP * const r|NN CLONE_PARAMS* param
 #endif
 EXp    |regexp_engine const *|current_re_engine
-Ap     |REGEXP*|pregcomp       |NN SV * const pattern|const U32 flags
+Apdh   |REGEXP*|pregcomp       |NN SV * const pattern|const U32 flags
 p      |REGEXP*|re_op_compile  |NULLOK SV ** const patternp \
                                |int pat_count|NULLOK OP *expr \
                                |NN const regexp_engine* eng \
@@ -1947,7 +1951,7 @@ Cp        |char*  |re_intuit_start|NN REGEXP * const rx \
                                |const U32 flags \
                                |NULLOK re_scream_pos_data *data
 Cp     |SV*    |re_intuit_string|NN REGEXP  *const r
-Ap     |I32    |regexec_flags  |NN REGEXP *const rx|NN char *stringarg \
+Cp     |I32    |regexec_flags  |NN REGEXP *const rx|NN char *stringarg \
                                |NN char *strend|NN char *strbeg \
                                |SSize_t minend|NN SV *sv \
                                |NULLOK void *data|U32 flags
@@ -2591,10 +2595,10 @@ p       |void   |report_redefined_cv|NN const SV *name \
 Apd    |void   |warn_sv        |NN SV *baseex
 Afpd   |void   |warn           |NN const char* pat|...
 Apd    |void   |vwarn          |NN const char* pat|NULLOK va_list* args
-Afp    |void   |warner         |U32 err|NN const char* pat|...
-Afp    |void   |ck_warner      |U32 err|NN const char* pat|...
-Afp    |void   |ck_warner_d    |U32 err|NN const char* pat|...
-A    |void   |vwarner        |U32 err|NN const char* pat|NULLOK va_list* args
+Adfp   |void   |warner         |U32 err|NN const char* pat|...
+Adfp   |void   |ck_warner      |U32 err|NN const char* pat|...
+Adfp   |void   |ck_warner_d    |U32 err|NN const char* pat|...
+Adp    |void   |vwarner        |U32 err|NN const char* pat|NULLOK va_list* args
 #ifdef USE_C_BACKTRACE
 pd     |Perl_c_backtrace*|get_c_backtrace|int max_depth|int skip
 dm     |void   |free_c_backtrace|NN Perl_c_backtrace* bt
@@ -2603,10 +2607,10 @@ Apd     |bool   |dump_c_backtrace|NN PerlIO* fp|int max_depth|int skip
 #endif
 : FIXME
 p      |void   |watch          |NN char** addr
-Am     |I32    |whichsig       |NN const char* sig
-Ap     |I32    |whichsig_sv    |NN SV* sigsv
-Ap     |I32    |whichsig_pv    |NN const char* sig
-Ap     |I32    |whichsig_pvn   |NN const char* sig|STRLEN len
+Amd    |I32    |whichsig       |NN const char* sig
+Apd    |I32    |whichsig_sv    |NN SV* sigsv
+Apd    |I32    |whichsig_pv    |NN const char* sig
+Apd    |I32    |whichsig_pvn   |NN const char* sig|STRLEN len
 : used to check for NULs in pathnames and other names
 AiRdp  |bool   |is_safe_syscall|NN const char *pv|STRLEN len|NN const char *what|NN const char *op_name
 #ifdef PERL_CORE
@@ -2720,7 +2724,7 @@ AiTp      |void   |SvAMAGIC_off   |NN SV *sv
 : This is indirectly referenced by globals.c. This is somewhat annoying.
 p      |int    |magic_killbackrefs|NN SV *sv|NN MAGIC *mg
 Ap     |OP*    |newANONATTRSUB |I32 floor|NULLOK OP *proto|NULLOK OP *attrs|NULLOK OP *block
-A    |CV*    |newATTRSUB     |I32 floor|NULLOK OP *o|NULLOK OP *proto|NULLOK OP *attrs|NULLOK OP *block
+Adm    |CV*    |newATTRSUB     |I32 floor|NULLOK OP *o|NULLOK OP *proto|NULLOK OP *attrs|NULLOK OP *block
 pdX    |CV*    |newATTRSUB_x   |I32 floor|NULLOK OP *o|NULLOK OP *proto \
                                 |NULLOK OP *attrs|NULLOK OP *block \
                                 |bool o_is_gv
@@ -3291,7 +3295,7 @@ Apd       |void   |sv_catpv_flags |NN SV *dstr|NN const char *sstr \
 Apd    |void   |sv_catsv_flags |NN SV *const dsv|NULLOK SV *const ssv|const I32 flags
 Amd    |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
-Apd    |char*  |sv_pvn_force_flags|NN SV *const sv|NULLOK STRLEN *const lp|const I32 flags
+Apd    |char*  |sv_pvn_force_flags|NN SV *const sv|NULLOK STRLEN *const lp|const U32 flags
 AdpMb  |void   |sv_copypv      |NN SV *const dsv|NN SV *const ssv
 Amd    |void   |sv_copypv_nomg |NN SV *const dsv|NN SV *const ssv
 Apd    |void   |sv_copypv_flags        |NN SV *const dsv|NN SV *const ssv|const I32 flags
@@ -3384,7 +3388,7 @@ Sd        |PADOFFSET|pad_findlex  |NN const char *namepv|STRLEN namelen|U32 flags \
 #endif
 #ifdef DEBUGGING
 Cpd    |SV*    |pad_sv         |PADOFFSET po
-Apd    |void   |pad_setsv      |PADOFFSET po|NN SV* sv
+Cpd    |void   |pad_setsv      |PADOFFSET po|NN SV* sv
 #endif
 pd     |void   |pad_block_start|int full
 Apd    |U32    |intro_my
@@ -3474,8 +3478,8 @@ Sxd       |SV*    |find_uninit_var|NULLOK const OP *const obase \
                |NN const char **desc_p
 #endif
 
-A    |GV*    |gv_fetchpvn_flags|NN const char* name|STRLEN len|I32 flags|const svtype sv_type
-A    |GV*    |gv_fetchsv|NN SV *name|I32 flags|const svtype sv_type
+Adp    |GV*    |gv_fetchpvn_flags|NN const char* name|STRLEN len|I32 flags|const svtype sv_type
+Adp    |GV*    |gv_fetchsv|NN SV *name|I32 flags|const svtype sv_type
 
 #ifdef DEBUG_LEAKING_SCALARS_FORK_DUMP
 : Used in sv.c