This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Convert the implementation of XS_APIVERSION_BOOTCHECK to a function.
[perl5.git] / embed.fnc
index 9ba33d1..3ddf03d 100644 (file)
--- a/embed.fnc
+++ b/embed.fnc
 :
 : Individual flags may be separated by whitespace.
 
-START_EXTERN_C
-
 #if defined(PERL_IMPLICIT_SYS)
 Ano    |PerlInterpreter*|perl_alloc_using \
                                |NN struct IPerlMem *ipM \
@@ -170,11 +168,6 @@ npR        |MEM_SIZE|malloc_good_size      |size_t nbytes
 AnpR   |void*  |get_context
 Anp    |void   |set_context    |NN void *t
 
-END_EXTERN_C
-
-/* functions with flag 'n' should come before here */
-START_EXTERN_C
-#  include "pp_proto.h"
 XEop   |bool   |try_amagic_bin |int method|int flags
 XEop   |bool   |try_amagic_un  |int method|int flags
 Ap     |SV*    |amagic_call    |NN SV* left|NN SV* right|int method|int dir
@@ -240,6 +233,8 @@ Apd |HV*    |cop_hints_2hv  |NN const COP *cop
 Apd    |SV*    |cop_hints_fetchpvn|NN const COP *cop|NN const char *key \
                                |STRLEN klen|int flags|U32 hash
 Amd    |SV*    |cop_hints_fetchpvs|NN const COP *cop|NN const char *const key
+Amd    |SV*    |cop_hints_fetchpv|NN const COP *cop|NN const char *const key \
+                               |int flags|U32 hash
 Amd    |SV*    |cop_hints_fetchsv|NN const COP *cop|NN SV *keysv|U32 hash
 : Used in op.c and perl.c
 pM     |PERL_CONTEXT*  |create_eval_scope|U32 flags
@@ -624,6 +619,7 @@ p   |void   |lex_start      |NULLOK SV* line|NULLOK PerlIO *rsfp|bool new_filter
 AMpd   |bool   |lex_bufutf8
 AMpd   |char*  |lex_grow_linestr|STRLEN len
 AMpd   |void   |lex_stuff_pvn  |NN const char* pv|STRLEN len|U32 flags
+AMpd   |void   |lex_stuff_pv   |NN const char* pv|U32 flags
 AMpd   |void   |lex_stuff_sv   |NN SV* sv|U32 flags
 AMpd   |void   |lex_unstuff    |NN char* ptr
 AMpd   |void   |lex_read_to    |NN char* ptr
@@ -634,6 +630,7 @@ AMpd        |I32    |lex_read_unichar|U32 flags
 AMpd   |void   |lex_read_space |U32 flags
 : Public parser API
 AMpd   |OP*    |parse_fullstmt |U32 flags
+AMpd   |OP*    |parse_stmtseq  |U32 flags
 : Used in various files
 Ap     |void   |op_null        |NN OP* o
 : FIXME. Used by Data::Alias
@@ -836,6 +833,7 @@ Apda        |SV*    |newSVpvn       |NULLOK const char *const s|const STRLEN len
 Apda   |SV*    |newSVpvn_flags |NULLOK const char *const s|const STRLEN len|const U32 flags
 Apda   |SV*    |newSVhek       |NULLOK const HEK *const hek
 Apda   |SV*    |newSVpvn_share |NULLOK const char* s|I32 len|U32 hash
+Apda   |SV*    |newSVpv_share  |NULLOK const char* s|U32 hash
 Afpda  |SV*    |newSVpvf       |NN const char *const pat|...
 Apa    |SV*    |vnewSVpvf      |NN const char *const pat|NULLOK va_list *const args
 Apd    |SV*    |newSVrv        |NN SV *const rv|NULLOK const char *const classname
@@ -855,7 +853,7 @@ Apd |const char*    |prescan_version        |NN const char *s\
        |NULLOK int *ssaw_decimal|NULLOK int *swidth|NULLOK bool *salpha
 Apd    |SV*    |new_version    |NN SV *ver
 Apd    |SV*    |upg_version    |NN SV *ver|bool qv
-Apd    |bool   |vverify        |NN SV *vs
+Apd    |SV*    |vverify        |NN SV *vs
 Apd    |SV*    |vnumify        |NN SV *vs
 Apd    |SV*    |vnormal        |NN SV *vs
 Apd    |SV*    |vstringify     |NN SV *vs
@@ -1027,6 +1025,7 @@ Apda      |char*  |savepv         |NULLOK const char* pv
 Apda   |char*  |savepvn        |NULLOK const char* pv|I32 len
 Apda   |char*  |savesharedpv   |NULLOK const char* pv
 Apda   |char*  |savesharedpvn  |NN const char *const pv|const STRLEN len
+Apda   |char*  |savesharedsvpv |NN SV *sv
 Apda   |char*  |savesvpv       |NN SV* sv
 Ap     |void   |savestack_grow
 Ap     |void   |savestack_grow_cnt     |I32 need
@@ -1044,7 +1043,7 @@ Ap        |void   |save_destructor|DESTRUCTORFUNC_NOCONTEXT_t f|NN void* p
 Ap     |void   |save_destructor_x|DESTRUCTORFUNC_t f|NULLOK void* p
 Apmb   |void   |save_freesv    |NULLOK SV* sv
 : Used in SAVEFREOP(), used in op.c, pp_ctl.c
-pmb    |void   |save_freeop    |NULLOK OP* o
+Apmb   |void   |save_freeop    |NULLOK OP* o
 Apmb   |void   |save_freepv    |NULLOK char* pv
 Ap     |void   |save_generic_svref|NN SV** sptr
 Ap     |void   |save_generic_pvref|NN char** str
@@ -1066,7 +1065,7 @@ Ap        |void   |save_long      |NN long* longp
 Apmb   |void   |save_mortalizesv|NN SV* sv
 Ap     |void   |save_nogv      |NN GV* gv
 : Used in SAVEFREOP(), used in gv.c, op.c, perl.c, pp_ctl.c, pp_sort.c
-pmb    |void   |save_op
+Apmb   |void   |save_op
 Ap     |SV*    |save_scalar    |NN GV* gv
 Ap     |void   |save_pptr      |NN char** pptr
 Ap     |void   |save_vptr      |NN void *ptr
@@ -1076,9 +1075,9 @@ Ap        |void   |save_sptr      |NN SV** sptr
 Ap     |SV*    |save_svref     |NN SV** sptr
 Ap     |void   |save_pushptr   |NULLOK void *const ptr|const int type
 : Used by SAVECOPARYBASE() in op.c
-     |void   |save_pushi32ptr|const I32 i|NULLOK void *const ptr|const int type
+Ap     |void   |save_pushi32ptr|const I32 i|NULLOK void *const ptr|const int type
 : Used by SAVESWITCHSTACK() in pp.c
-     |void   |save_pushptrptr|NULLOK void *const ptr1 \
+Ap     |void   |save_pushptrptr|NULLOK void *const ptr1 \
                                |NULLOK void *const ptr2|const int type
 #if defined(PERL_IN_SCOPE_C)
 s      |void   |save_pushptri32ptr|NULLOK void *const ptr1|const I32 i \
@@ -1497,8 +1496,6 @@ Adpb      |void   |sv_nounlocking |NULLOK SV *sv
 #endif
 Adp    |int    |nothreadhook
 
-END_EXTERN_C
-
 #if defined(PERL_IN_DOOP_C)
 sR     |I32    |do_trans_simple        |NN SV * const sv
 sR     |I32    |do_trans_count         |NN SV * const sv
@@ -1546,48 +1543,6 @@ s        |void   |unwind_handler_stack|NN const void *p
 #endif
 
 #if defined(PERL_IN_OP_C)
-: These are all indirectly referenced by globals.c. This is somewhat annoying.
-pR     |OP*    |ck_anoncode    |NN OP *o
-pR     |OP*    |ck_bitop       |NN OP *o
-pR     |OP*    |ck_concat      |NN OP *o
-pR     |OP*    |ck_defined     |NN OP *o
-pR     |OP*    |ck_delete      |NN OP *o
-pR     |OP*    |ck_die         |NN OP *o
-pR     |OP*    |ck_eof         |NN OP *o
-pR     |OP*    |ck_eval        |NN OP *o
-pR     |OP*    |ck_exec        |NN OP *o
-pR     |OP*    |ck_exists      |NN OP *o
-pR     |OP*    |ck_exit        |NN OP *o
-pR     |OP*    |ck_ftst        |NN OP *o
-pR     |OP*    |ck_fun         |NN OP *o
-pR     |OP*    |ck_glob        |NN OP *o
-pR     |OP*    |ck_grep        |NN OP *o
-pR     |OP*    |ck_index       |NN OP *o
-pR     |OP*    |ck_join        |NN OP *o
-pR     |OP*    |ck_lfun        |NN OP *o
-pR     |OP*    |ck_listiob     |NN OP *o
-pR     |OP*    |ck_match       |NN OP *o
-pR     |OP*    |ck_method      |NN OP *o
-pR     |OP*    |ck_null        |NN OP *o
-pR     |OP*    |ck_open        |NN OP *o
-pR     |OP*    |ck_readline    |NN OP *o
-pR     |OP*    |ck_repeat      |NN OP *o
-pR     |OP*    |ck_require     |NN OP *o
-pR     |OP*    |ck_return      |NN OP *o
-pR     |OP*    |ck_rfun        |NN OP *o
-pR     |OP*    |ck_rvconst     |NN OP *o
-pR     |OP*    |ck_sassign     |NN OP *o
-pR     |OP*    |ck_select      |NN OP *o
-pR     |OP*    |ck_shift       |NN OP *o
-pR     |OP*    |ck_sort        |NN OP *o
-pR     |OP*    |ck_spair       |NN OP *o
-pR     |OP*    |ck_split       |NN OP *o
-pR     |OP*    |ck_subr        |NN OP *o
-pR     |OP*    |ck_substr      |NN OP *o
-pR     |OP*    |ck_svconst     |NN OP *o
-pR     |OP*    |ck_trunc       |NN OP *o
-pR     |OP*    |ck_unpack      |NN OP *o
-pR     |OP*    |ck_each        |NN OP *o
 sRn    |bool   |is_handle_constructor|NN const OP *o|I32 numargs
 sR     |I32    |is_list_assignment|NULLOK const OP *o
 #  ifdef USE_ITHREADS
@@ -1903,7 +1858,6 @@ s |int    |sv_2iuv_non_preserve   |NN SV *const sv
 #    endif
 #  endif
 sR     |I32    |expect_number  |NN char **const pattern
-#
 sn     |STRLEN |sv_pos_u2b_forwards|NN const U8 *const start \
                |NN const U8 *const send|NN STRLEN *const uoffset \
                |NN bool *const at_end
@@ -2034,11 +1988,11 @@ sR      |bool   |is_utf8_common |NN const U8 *const p|NN SV **swash|NN const char * con
 sR     |SV*    |swash_get      |NN SV* swash|UV start|UV span
 #endif
 
-START_EXTERN_C
-
 Apd    |void   |sv_setsv_flags |NN SV *dstr|NULLOK SV *sstr|const I32 flags
 Apd    |void   |sv_catpvn_flags|NN SV *const dstr|NN const char *sstr|const STRLEN len \
                                |const I32 flags
+Apd    |void   |sv_catpv_flags |NN SV *dstr|NN const char *sstr \
+                               |const I32 flags
 Apd    |void   |sv_catsv_flags |NN SV *const dsv|NULLOK SV *const ssv|const I32 flags
 Apmd   |STRLEN |sv_utf8_upgrade_flags|NN SV *const sv|const I32 flags
 Ap     |STRLEN |sv_utf8_upgrade_flags_grow|NN SV *const sv|const I32 flags|STRLEN extra
@@ -2301,6 +2255,15 @@ Apo      |void*  |my_cxt_init    |NN int *index|size_t size
 #endif
 #endif
 
+: This function is an implementation detail. The public API for this is
+: XS_VERSION_BOOTCHECK
+Xpo    |void   |xs_version_bootcheck|U32 items|U32 ax|NN const char *xs_p \
+                               |STRLEN xs_len
+: This function is an implementation detail. The public API for this is
+: XS_APIVERSION_BOOTCHECK
+Xpo    |void   |xs_apiversion_bootcheck|NN SV *module|NN const char *api_p \
+                               |STRLEN api_len
+
 #ifndef HAS_STRLCAT
 Apno   |Size_t |my_strlcat     |NULLOK char *dst|NULLOK const char *src|Size_t size
 #endif
@@ -2329,6 +2292,7 @@ Mp        |void   |xmldump_form   |NN const GV* gv
 Mp     |void   |xmldump_eval
 Mp     |char*  |sv_catxmlsv    |NN SV *dsv|NN SV *ssv
 Mp     |char*  |sv_catxmlpvn   |NN SV *dsv|NN const char *pv|STRLEN len|int utf8
+Mp     |char*  |sv_catxmlpv    |NN SV *dsv|NN const char *pv|int utf8
 Mp     |char*  |sv_xmlpeek     |NN SV* sv
 Mp     |void   |do_pmop_xmldump|I32 level|NN PerlIO *file \
                                |NULLOK const PMOP *pm
@@ -2415,7 +2379,4 @@ Aanop     |CLONE_PARAMS *|clone_params_new|NN PerlInterpreter *const from \
                |NN PerlInterpreter *const to
 Anop   |void   |clone_params_del|NN CLONE_PARAMS *param
 #endif
-END_EXTERN_C
-/*
- * ex: set ts=8 sts=4 sw=4 noet:
- */
+: ex: set ts=8 sts=4 sw=4 noet: