Fix regexec.c so $^N and $+ are correctly updated so that they work properly inside...
[p5sagit/p5-mst-13.2.git] / embed.fnc
index 0e6e3f7..cfe292b 100644 (file)
--- a/embed.fnc
+++ b/embed.fnc
@@ -1,3 +1,5 @@
+: BEGIN {die "You meant to run embed.pl"} # Stop early if fed to perl.
+:
 : Lines are of the form:
 :    flags|return_type|function_name|arg1|arg2|...|argN
 :
@@ -38,9 +40,6 @@
 : which is ambiguous.
 :
 : Individual flags may be separated by whitespace.
-:
-: New global functions should be added at the end for binary compatibility
-: in some configurations.
 
 START_EXTERN_C
 
@@ -115,6 +114,10 @@ Apd        |void   |av_undef       |NN AV* ar
 ApdoxM |SV**   |av_create_and_unshift_one|NN AV **const avp|NN SV *const val
 Apd    |void   |av_unshift     |NN AV* ar|I32 num
 Apo    |SV**   |av_arylen_p    |NN AV* av
+Apo    |IV*    |av_iter_p      |NN AV* av
+#if defined(PERL_IN_AV_C) || defined(PERL_DECL_PROT)
+s      |MAGIC* |get_aux_mg     |NN AV *av
+#endif
 pR     |OP*    |bind_match     |I32 type|NN OP* left|NN OP* pat
 pR     |OP*    |block_end      |I32 floor|NULLOK OP* seq
 ApR    |I32    |block_gimme
@@ -433,7 +436,6 @@ dp  |int    |magic_clearhint|NN SV* sv|NN MAGIC* mg
 p      |int    |magic_clearpack|NN SV* sv|NN MAGIC* mg
 p      |int    |magic_clearsig |NN SV* sv|NN MAGIC* mg
 p      |int    |magic_existspack|NN SV* sv|NN const MAGIC* mg
-p      |int    |magic_freeregexp|NN SV* sv|NN MAGIC* mg
 p      |int    |magic_freeovrld|NN SV* sv|NN MAGIC* mg
 p      |int    |magic_get      |NN SV* sv|NN MAGIC* mg
 p      |int    |magic_getarylen|NN SV* sv|NN const MAGIC* mg
@@ -455,14 +457,11 @@ p |int    |magic_set      |NN SV* sv|NN MAGIC* mg
 p      |int    |magic_setamagic|NN SV* sv|NN MAGIC* mg
 p      |int    |magic_setarylen|NN SV* sv|NN MAGIC* mg
 p      |int    |magic_freearylen_p|NN SV* sv|NN MAGIC* mg
-p      |int    |magic_setbm    |NN SV* sv|NN MAGIC* mg
 p      |int    |magic_setdbline|NN SV* sv|NN MAGIC* mg
 p      |int    |magic_setdefelem|NN SV* sv|NN MAGIC* mg
 p      |int    |magic_setenv   |NN SV* sv|NN MAGIC* mg
-p      |int    |magic_setfm    |NN SV* sv|NN MAGIC* mg
 dp     |int    |magic_sethint  |NN SV* sv|NN MAGIC* mg
 p      |int    |magic_setisa   |NN SV* sv|NN MAGIC* mg
-p      |int    |magic_setglob  |NN SV* sv|NN MAGIC* mg
 p      |int    |magic_setmglob |NN SV* sv|NN MAGIC* mg
 p      |int    |magic_setnkeys |NN SV* sv|NN MAGIC* mg
 p      |int    |magic_setpack  |NN SV* sv|NN MAGIC* mg
@@ -563,7 +562,7 @@ ApM |CV *   |newXS_flags    |NULLOK const char *name|NN XSUBADDR_t subaddr\
                                |NN const char *const filename \
                                |NULLOK const char *const proto|U32 flags
 Apd    |CV*    |newXS          |NULLOK const char* name|NN XSUBADDR_t f|NN const char* filename
-Apda   |AV*    |newAV
+AmdbR  |AV*    |newAV
 Apa    |OP*    |newAVREF       |NN OP* o
 Apa    |OP*    |newBINOP       |I32 type|I32 flags|NULLOK OP* first|NULLOK OP* last
 Apa    |OP*    |newCVREF       |I32 flags|NULLOK OP* o
@@ -571,7 +570,7 @@ Apa |OP*    |newGVOP        |I32 type|I32 flags|NN GV* gv
 Apa    |GV*    |newGVgen       |NN const char* pack
 Apa    |OP*    |newGVREF       |I32 type|NULLOK OP* o
 ApaR   |OP*    |newHVREF       |NN OP* o
-ApdaR  |HV*    |newHV
+AmdbR  |HV*    |newHV
 ApaR   |HV*    |newHVhv        |NULLOK HV* hv
 Apa    |IO*    |newIO
 Apa    |OP*    |newLISTOP      |I32 type|I32 flags|NULLOK OP* first|NULLOK OP* last
@@ -590,6 +589,7 @@ Apda        |SV*    |newSVuv        |UV u
 Apda   |SV*    |newSVnv        |NV n
 Apda   |SV*    |newSVpv        |NULLOK const char* s|STRLEN len
 Apda   |SV*    |newSVpvn       |NULLOK const char* s|STRLEN len
+Apda   |SV*    |newSVpvn_flags |NULLOK const char* s|STRLEN len|U32 flags
 Apda   |SV*    |newSVhek       |NULLOK const HEK *hek
 Apda   |SV*    |newSVpvn_share |NULLOK const char* s|I32 len|U32 hash
 Afpda  |SV*    |newSVpvf       |NN const char* pat|...
@@ -684,8 +684,9 @@ Ap  |SV*    |regclass_swash |NULLOK const regexp *prog|NN const struct regnode *n|bo
 Ap     |I32    |pregexec       |NN REGEXP * const prog|NN char* stringarg \
                                |NN char* strend|NN char* strbeg|I32 minend \
                                |NN SV* screamer|U32 nosave
-Ap     |void   |pregfree       |NULLOK struct regexp* r
-EXp    |struct regexp* |reg_temp_copy  |NN struct regexp* r
+Ap     |void   |pregfree       |NULLOK REGEXP* r
+Ap     |void   |pregfree2      |NN REGEXP* prog
+EXp    |REGEXP*|reg_temp_copy  |NN REGEXP* r
 Ap     |void   |regfree_internal|NULLOK REGEXP * const r
 Ap     |char * |reg_stringify  |NN MAGIC *mg|NULLOK STRLEN *lp|NULLOK U32 *flags|NULLOK I32 *haseval
 #if defined(USE_ITHREADS)
@@ -815,6 +816,7 @@ Amb |IV     |sv_2iv         |NN SV* sv
 Apd    |IV     |sv_2iv_flags   |NN SV* sv|I32 flags
 Apd    |SV*    |sv_2mortal     |NULLOK SV* sv
 Apd    |NV     |sv_2nv         |NN SV* sv
+pMd    |SV*    |sv_2num        |NN SV* sv
 Amb    |char*  |sv_2pv         |NN SV* sv|NULLOK STRLEN* lp
 Apd    |char*  |sv_2pv_flags   |NN SV* sv|NULLOK STRLEN* lp|I32 flags
 Apd    |char*  |sv_2pvutf8     |NN SV* sv|NULLOK STRLEN* lp
@@ -1083,7 +1085,8 @@ Apa       |ANY*   |ss_dup         |NN PerlInterpreter* proto_perl|NN CLONE_PARAMS* param
 ApR    |void*  |any_dup        |NULLOK void* v|NN const PerlInterpreter* proto_perl
 ApR    |HE*    |he_dup         |NULLOK const HE* e|bool shared|NN CLONE_PARAMS* param
 ApR    |HEK*   |hek_dup        |NULLOK HEK* e|NN CLONE_PARAMS* param
-ApR    |REGEXP*|re_dup         |NULLOK const REGEXP* r|NN CLONE_PARAMS* param
+Ap     |void   |re_dup_guts    |NN const REGEXP *sstr|NN REGEXP *dstr \
+                               |NN CLONE_PARAMS* param
 Ap     |PerlIO*|fp_dup         |NULLOK PerlIO* fp|char type|NN CLONE_PARAMS* param
 ApR    |DIR*   |dirp_dup       |NULLOK DIR* dp
 ApR    |GP*    |gp_dup         |NULLOK GP* gp|NN CLONE_PARAMS* param
@@ -1113,6 +1116,7 @@ ApR       |const char *   |custom_op_desc |NN const OP* op
 
 Adp    |void   |sv_nosharing   |NULLOK SV *sv
 Adpbm  |void   |sv_nolocking   |NULLOK SV *sv
+Adp    |bool   |sv_destroyable |NULLOK SV *sv
 #ifdef NO_MATHOMS
 Adpbm  |void   |sv_nounlocking |NULLOK SV *sv
 #else
@@ -1211,6 +1215,7 @@ 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
@@ -1323,11 +1328,13 @@ sR      |I32    |dopoptosub_at  |NN const PERL_CONTEXT* cxstk|I32 startingblock
 sR     |I32    |dopoptowhen    |I32 startingblock
 s      |void   |save_lines     |NULLOK AV *array|NN SV *sv
 s      |bool   |doeval         |int gimme|NULLOK OP** startop|NULLOK CV* outside|U32 seq
-sR     |PerlIO *|check_type_and_open|NN const char *name|NN const char *mode
-sR     |PerlIO *|doopen_pm     |NN const char *name|NN const char *mode
+sR     |PerlIO *|check_type_and_open|NN const char *name
+#ifndef PERL_DISABLE_PMC
+sR     |PerlIO *|doopen_pm     |NN const char *name|const STRLEN namelen
+#endif
 sRn    |bool   |path_is_absolute|NN const char *name
 sR     |I32    |run_user_filter|int idx|NN SV *buf_sv|int maxlen
-sR     |PMOP*  |make_matcher   |NN regexp* re
+sR     |PMOP*  |make_matcher   |NN REGEXP* re
 sR     |bool   |matcher_matches_sv|NN PMOP* matcher|NN SV* sv
 s      |void   |destroy_matcher|NN PMOP* matcher
 s      |OP*    |do_smartmatch  |NULLOK HV* seen_this|NULLOK HV* seen_other
@@ -1444,7 +1451,9 @@ ERs       |I32    |reg_check_named_buff_matched   |NN const regexp *rex|NN const regnode *p
 #  ifdef DEBUGGING
 Es     |void   |dump_exec_pos  |NN const char *locinput|NN const regnode *scan|NN const char *loc_regeol\
                                |NN const char *loc_bostr|NN const char *loc_reg_starttry|const bool do_utf8
-Es     |void   |debug_start_match|NN const regexp *prog|const bool do_utf8|NN const char *start|NN const char *end|NN const char *blurb
+Es     |void   |debug_start_match|NN const REGEXP *prog|const bool do_utf8\
+                               |NN const char *start|NN const char *end\
+                               |NN const char *blurb
 #  endif
 #endif
 
@@ -1546,12 +1555,13 @@ sR      |I32    |sublex_done
 sR     |I32    |sublex_push
 sR     |I32    |sublex_start
 sR     |char * |filter_gets    |NN SV *sv|NN PerlIO *fp|STRLEN append
-sR     |HV *   |find_in_my_stash|NN const char *pkgname|I32 len
+sR     |HV *   |find_in_my_stash|NN const char *pkgname|STRLEN len
 sR     |char * |tokenize_use   |int is_use|NN char *s
-s      |SV*    |new_constant   |NULLOK const char *s|STRLEN len|NN const char *key|NN SV *sv \
-                               |NULLOK SV *pv|NULLOK const char *type
+so     |SV*    |new_constant   |NULLOK const char *s|STRLEN len \
+                               |NN const char *key|STRLEN keylen|NN SV *sv \
+                               |NULLOK SV *pv|NULLOK const char *type \
+                               |STRLEN typelen
 s      |int    |ao             |int toketype
-s      |const char*|incl_perldb
 #  if defined(PERL_CR_FILTER)
 s      |I32    |cr_textfilter  |int idx|NULLOK SV *sv|int maxlen
 s      |void   |strip_return   |NN SV *sv
@@ -1890,7 +1900,7 @@ Apd       |void   |mro_method_changed_in  |NN HV* stash
 p      |void   |boot_core_mro
 Apon   |void   |sys_init       |NN int* argc|NN char*** argv
 Apon   |void   |sys_init3      |NN int* argc|NN char*** argv|NN char*** env
-Apo    |void   |sys_term
+Apon   |void   |sys_term
 
 
 END_EXTERN_C