This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Marcus Holland-Moritz notes that the first argument to
[perl5.git] / proto.h
diff --git a/proto.h b/proto.h
index 11a5fc4..56a2fd2 100644 (file)
--- a/proto.h
+++ b/proto.h
@@ -3,7 +3,7 @@
  *    proto.h
  *
  *    Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- *    2000, 2001, 2002, 2003, 2004, 2005, 2006, by Larry Wall and others
+ *    2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, by Larry Wall and others
  *
  *    You may distribute under the terms of either the GNU General Public
  *    License or the Artistic License, as specified in the README file.
@@ -226,7 +226,8 @@ PERL_CALLCONV OP*   Perl_convert(pTHX_ I32 optype, I32 flags, OP* o)
 
 PERL_CALLCONV PERL_CONTEXT*    Perl_create_eval_scope(pTHX_ U32 flags);
 PERL_CALLCONV void     Perl_croak(pTHX_ const char* pat, ...)
-                       __attribute__noreturn__;
+                       __attribute__noreturn__
+                       __attribute__format__null_ok__(__printf__,pTHX_1,pTHX_2);
 
 PERL_CALLCONV void     Perl_vcroak(pTHX_ const char* pat, va_list* args)
                        __attribute__noreturn__
@@ -383,7 +384,9 @@ PERL_CALLCONV void  Perl_deprecate(pTHX_ const char* s)
 PERL_CALLCONV void     Perl_deprecate_old(pTHX_ const char* s)
                        __attribute__nonnull__(pTHX_1);
 
-PERL_CALLCONV OP*      Perl_die(pTHX_ const char* pat, ...);
+PERL_CALLCONV OP*      Perl_die(pTHX_ const char* pat, ...)
+                       __attribute__format__null_ok__(__printf__,pTHX_1,pTHX_2);
+
 PERL_CALLCONV OP*      Perl_vdie(pTHX_ const char* pat, va_list* args);
 PERL_CALLCONV OP*      Perl_die_where(pTHX_ const char* message, STRLEN msglen);
 PERL_CALLCONV void     Perl_dounwind(pTHX_ I32 cxix);
@@ -585,6 +588,9 @@ PERL_CALLCONV char* Perl_getenv_len(pTHX_ const char* key, unsigned long *len)
                        __attribute__nonnull__(pTHX_2);
 
 #endif
+PERL_CALLCONV void     Perl_get_db_sub(pTHX_ SV **svp, CV *cv)
+                       __attribute__nonnull__(pTHX_2);
+
 PERL_CALLCONV void     Perl_gp_free(pTHX_ GV* gv);
 PERL_CALLCONV GP*      Perl_gp_ref(pTHX_ GP* gp);
 PERL_CALLCONV GV*      Perl_gv_AVadd(pTHX_ GV* gv)
@@ -731,9 +737,7 @@ PERL_CALLCONV void  Perl_hv_ksplit(pTHX_ HV* hv, IV newmax)
                        __attribute__nonnull__(pTHX_1); */
 
 PERL_CALLCONV HV *     Perl_refcounted_he_chain_2hv(pTHX_ const struct refcounted_he *c);
-PERL_CALLCONV SV *     Perl_refcounted_he_fetch(pTHX_ const struct refcounted_he *chain, SV *keysv, const char *key, STRLEN klen, int flags, U32 hash)
-                       __attribute__nonnull__(pTHX_1);
-
+PERL_CALLCONV SV *     Perl_refcounted_he_fetch(pTHX_ const struct refcounted_he *chain, SV *keysv, const char *key, STRLEN klen, int flags, U32 hash);
 PERL_CALLCONV void     Perl_refcounted_he_free(pTHX_ struct refcounted_he *he);
 PERL_CALLCONV struct refcounted_he *   Perl_refcounted_he_new(pTHX_ struct refcounted_he *const parent, SV *const key, SV *const value);
 PERL_CALLCONV SV**     Perl_hv_store(pTHX_ HV* tb, const char* key, I32 klen, SV* val, U32 hash);
@@ -1010,9 +1014,7 @@ PERL_CALLCONV I32 Perl_keyword(pTHX_ const char* d, I32 len, bool all_keywords)
 
 PERL_CALLCONV void     Perl_leave_scope(pTHX_ I32 base);
 PERL_CALLCONV void     Perl_lex_end(pTHX);
-PERL_CALLCONV void     Perl_lex_start(pTHX_ SV* line)
-                       __attribute__nonnull__(pTHX_1);
-
+PERL_CALLCONV void     Perl_lex_start(pTHX_ SV* line);
 PERL_CALLCONV void     Perl_op_null(pTHX_ OP* o)
                        __attribute__nonnull__(pTHX_1);
 
@@ -1765,7 +1767,10 @@ PERL_CALLCONV AV*        Perl_get_av(pTHX_ const char* name, I32 create)
 PERL_CALLCONV HV*      Perl_get_hv(pTHX_ const char* name, I32 create)
                        __attribute__nonnull__(pTHX_1);
 
-PERL_CALLCONV CV*      Perl_get_cv(pTHX_ const char* name, I32 create)
+PERL_CALLCONV CV*      Perl_get_cv(pTHX_ const char* name, I32 flags)
+                       __attribute__nonnull__(pTHX_1);
+
+PERL_CALLCONV CV*      Perl_get_cvn_flags(pTHX_ const char* name, STRLEN len, I32 flags)
                        __attribute__nonnull__(pTHX_1);
 
 PERL_CALLCONV int      Perl_init_i18nl10n(pTHX_ int printwarn);
@@ -1830,11 +1835,12 @@ PERL_CALLCONV I32       Perl_pregexec(pTHX_ regexp* prog, char* stringarg, char* stren
                        __attribute__nonnull__(pTHX_6);
 
 PERL_CALLCONV void     Perl_pregfree(pTHX_ struct regexp* r);
+PERL_CALLCONV void     Perl_regfree_internal(pTHX_ struct regexp* r);
 PERL_CALLCONV char *   Perl_reg_stringify(pTHX_ MAGIC *mg, STRLEN *lp, U32 *flags, I32 *haseval)
                        __attribute__nonnull__(pTHX_1);
 
 #if defined(USE_ITHREADS)
-PERL_CALLCONV regexp*  Perl_regdupe(pTHX_ const regexp* r, CLONE_PARAMS* param)
+PERL_CALLCONV void*    Perl_regdupe_internal(pTHX_ const regexp* r, CLONE_PARAMS* param)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2);
 
@@ -1844,6 +1850,11 @@ PERL_CALLCONV regexp*    Perl_pregcomp(pTHX_ char* exp, char* xend, PMOP* pm)
                        __attribute__nonnull__(pTHX_2)
                        __attribute__nonnull__(pTHX_3);
 
+PERL_CALLCONV regexp*  Perl_re_compile(pTHX_ char* exp, char* xend, PMOP* pm)
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_2)
+                       __attribute__nonnull__(pTHX_3);
+
 PERL_CALLCONV char*    Perl_re_intuit_start(pTHX_ regexp* prog, SV* sv, char* strpos, char* strend, U32 flags, struct re_scream_pos_data_s *data)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_3)
@@ -1863,9 +1874,12 @@ PERL_CALLCONV regnode*   Perl_regnext(pTHX_ regnode* p)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1);
 
-PERL_CALLCONV SV*      Perl_reg_named_buff_sv(pTHX_ SV* namesv)
+PERL_CALLCONV SV*      Perl_reg_named_buff_get(pTHX_ SV* namesv, const REGEXP * const from_re, U32 flags)
                        __attribute__nonnull__(pTHX_1);
 
+PERL_CALLCONV SV*      Perl_reg_numbered_buff_get(pTHX_ I32 paren, const REGEXP * const rx, SV* usesv, U32 flags)
+                       __attribute__nonnull__(pTHX_2);
+
 PERL_CALLCONV void     Perl_regprop(pTHX_ const regexp *prog, SV* sv, const regnode* o)
                        __attribute__nonnull__(pTHX_2)
                        __attribute__nonnull__(pTHX_3);
@@ -2253,7 +2267,7 @@ PERL_CALLCONV STRLEN      Perl_sv_len_utf8(pTHX_ SV* sv);
 PERL_CALLCONV void     Perl_sv_magic(pTHX_ SV* sv, SV* obj, int how, const char* name, I32 namlen)
                        __attribute__nonnull__(pTHX_1);
 
-PERL_CALLCONV MAGIC *  Perl_sv_magicext(pTHX_ SV* sv, SV* obj, int how, MGVTBL *vtbl, const char* name, I32 namlen)
+PERL_CALLCONV MAGIC *  Perl_sv_magicext(pTHX_ SV* sv, SV* obj, int how, const MGVTBL *vtbl, const char* name, I32 namlen)
                        __attribute__nonnull__(pTHX_1);
 
 PERL_CALLCONV SV*      Perl_sv_mortalcopy(pTHX_ SV* oldsv)
@@ -2587,6 +2601,9 @@ PERL_CALLCONV int Perl_yyerror(pTHX_ const char* s)
 
 PERL_CALLCONV int      Perl_yylex(pTHX);
 PERL_CALLCONV int      Perl_yyparse(pTHX);
+PERL_CALLCONV void     Perl_parser_free(pTHX_ const yy_parser *)
+                       __attribute__nonnull__(pTHX_1);
+
 PERL_CALLCONV int      Perl_yywarn(pTHX_ const char* s)
                        __attribute__nonnull__(pTHX_1);
 
@@ -2700,18 +2717,15 @@ PERL_CALLCONV void      Perl_dump_vindent(pTHX_ I32 level, PerlIO *file, const char*
 
 PERL_CALLCONV void     Perl_do_gv_dump(pTHX_ I32 level, PerlIO *file, const char *name, GV *sv)
                        __attribute__nonnull__(pTHX_2)
-                       __attribute__nonnull__(pTHX_3)
-                       __attribute__nonnull__(pTHX_4);
+                       __attribute__nonnull__(pTHX_3);
 
 PERL_CALLCONV void     Perl_do_gvgv_dump(pTHX_ I32 level, PerlIO *file, const char *name, GV *sv)
                        __attribute__nonnull__(pTHX_2)
-                       __attribute__nonnull__(pTHX_3)
-                       __attribute__nonnull__(pTHX_4);
+                       __attribute__nonnull__(pTHX_3);
 
 PERL_CALLCONV void     Perl_do_hv_dump(pTHX_ I32 level, PerlIO *file, const char *name, HV *sv)
                        __attribute__nonnull__(pTHX_2)
-                       __attribute__nonnull__(pTHX_3)
-                       __attribute__nonnull__(pTHX_4);
+                       __attribute__nonnull__(pTHX_3);
 
 PERL_CALLCONV void     Perl_do_magic_dump(pTHX_ I32 level, PerlIO *file, const MAGIC *mg, I32 nest, I32 maxnest, bool dumpops, STRLEN pvlim)
                        __attribute__nonnull__(pTHX_2)
@@ -2847,6 +2861,11 @@ PERL_CALLCONV void       Perl_rvpv_dup(pTHX_ SV* dstr, const SV *sstr, CLONE_PARAMS* p
                        __attribute__nonnull__(pTHX_2)
                        __attribute__nonnull__(pTHX_3);
 
+PERL_CALLCONV yy_parser*       Perl_parser_dup(pTHX_ const yy_parser *proto, CLONE_PARAMS* param)
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_2);
+
+#endif
 PERL_CALLCONV PTR_TBL_t*       Perl_ptr_table_new(pTHX)
                        __attribute__malloc__
                        __attribute__warn_unused_result__;
@@ -2865,6 +2884,7 @@ PERL_CALLCONV void        Perl_ptr_table_split(pTHX_ PTR_TBL_t *tbl)
 
 PERL_CALLCONV void     Perl_ptr_table_clear(pTHX_ PTR_TBL_t *tbl);
 PERL_CALLCONV void     Perl_ptr_table_free(pTHX_ PTR_TBL_t *tbl);
+#if defined(USE_ITHREADS)
 #  if defined(HAVE_INTERP_INTERN)
 PERL_CALLCONV void     Perl_sys_intern_dup(pTHX_ struct interp_intern* src, struct interp_intern* dst)
                        __attribute__nonnull__(pTHX_1)
@@ -2886,12 +2906,6 @@ PERL_CALLCONV char *     Perl_custom_op_desc(pTHX_ const OP* op)
                        __attribute__nonnull__(pTHX_1);
 
 
-#if defined(PERL_OLD_COPY_ON_WRITE)
-PERL_CALLCONV int      Perl_sv_release_IVX(pTHX_ SV *sv)
-                       __attribute__nonnull__(pTHX_1);
-
-#endif
-
 PERL_CALLCONV void     Perl_sv_nosharing(pTHX_ SV *sv);
 /* PERL_CALLCONV void  Perl_sv_nolocking(pTHX_ SV *sv); */
 #ifdef NO_MATHOMS
@@ -2934,12 +2948,15 @@ STATIC I32      S_do_trans_complex_utf8(pTHX_ SV * const sv)
 STATIC void    S_gv_init_sv(pTHX_ GV *gv, I32 sv_type)
                        __attribute__nonnull__(pTHX_1);
 
-STATIC void    S_require_errno(pTHX_ GV *gv)
-                       __attribute__nonnull__(pTHX_1);
+STATIC HV*     S_require_tie_mod(pTHX_ GV *gv, const char *varpv, SV* namesv, const char *methpv, const U32 flags)
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_2)
+                       __attribute__nonnull__(pTHX_3)
+                       __attribute__nonnull__(pTHX_4);
 
 #endif
 
-PERL_CALLCONV void*    Perl_get_arena(pTHX_ int svtype)
+PERL_CALLCONV void*    Perl_get_arena(pTHX_ size_t svtype, U32 misc)
                        __attribute__malloc__
                        __attribute__warn_unused_result__;
 
@@ -3461,11 +3478,6 @@ STATIC void      S_do_oddball(pTHX_ HV *hash, SV **relem, SV **firstrelem)
                        __attribute__nonnull__(pTHX_2)
                        __attribute__nonnull__(pTHX_3);
 
-STATIC CV*     S_get_db_sub(pTHX_ SV **svp, CV *cv)
-                       __attribute__warn_unused_result__
-                       __attribute__nonnull__(pTHX_1)
-                       __attribute__nonnull__(pTHX_2);
-
 STATIC SV*     S_method_common(pTHX_ SV* meth, U32* hashp)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1);
@@ -3599,7 +3611,7 @@ STATIC char*      S_regwhite(char *p, const char *e)
 STATIC char*   S_nextchar(pTHX_ struct RExC_state_t *state)
                        __attribute__nonnull__(pTHX_1);
 
-STATIC void    S_scan_commit(pTHX_ const struct RExC_state_t* state, struct scan_data_t *data, I32 *minlenp)
+STATIC void    S_scan_commit(pTHX_ const struct RExC_state_t* state, struct scan_data_t *data, I32 *minlenp, int is_inf)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2)
                        __attribute__nonnull__(pTHX_3);
@@ -3636,7 +3648,7 @@ STATIC I32        S_study_chunk(pTHX_ struct RExC_state_t* state, regnode **scanp, I32
                        __attribute__nonnull__(pTHX_4)
                        __attribute__nonnull__(pTHX_5);
 
-STATIC I32     S_add_data(struct RExC_state_t* state, I32 n, const char *s)
+STATIC U32     S_add_data(struct RExC_state_t* state, U32 n, const char *s)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(1)
                        __attribute__nonnull__(3);
@@ -3674,14 +3686,17 @@ STATIC const regnode*   S_dumpuntil(pTHX_ const regexp *r, const regnode *start, c
 STATIC void    S_put_byte(pTHX_ SV* sv, int c)
                        __attribute__nonnull__(pTHX_1);
 
-STATIC void    S_dump_trie(pTHX_ const struct _reg_trie_data *trie, U32 depth)
-                       __attribute__nonnull__(pTHX_1);
+STATIC void    S_dump_trie(pTHX_ const struct _reg_trie_data *trie, HV* widecharmap, AV *revcharmap, U32 depth)
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_3);
 
-STATIC void    S_dump_trie_interim_list(pTHX_ const struct _reg_trie_data *trie, U32 next_alloc, U32 depth)
-                       __attribute__nonnull__(pTHX_1);
+STATIC void    S_dump_trie_interim_list(pTHX_ const struct _reg_trie_data *trie, HV* widecharmap, AV *revcharmap, U32 next_alloc, U32 depth)
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_3);
 
-STATIC void    S_dump_trie_interim_table(pTHX_ const struct _reg_trie_data *trie, U32 next_alloc, U32 depth)
-                       __attribute__nonnull__(pTHX_1);
+STATIC void    S_dump_trie_interim_table(pTHX_ const struct _reg_trie_data *trie, HV* widecharmap, AV *revcharmap, U32 next_alloc, U32 depth)
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_3);
 
 STATIC U8      S_regtail_study(pTHX_ struct RExC_state_t *state, regnode *p, const regnode *val, U32 depth)
                        __attribute__nonnull__(pTHX_1)
@@ -3867,10 +3882,10 @@ STATIC char *   S_F0convert(NV nv, char *endbuf, STRLEN *len)
                        __attribute__nonnull__(3);
 
 #  if defined(PERL_OLD_COPY_ON_WRITE)
-STATIC void    S_sv_release_COW(pTHX_ SV *sv, const char *pvx, STRLEN len, SV *after)
+STATIC void    S_sv_release_COW(pTHX_ SV *sv, const char *pvx, SV *after)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2)
-                       __attribute__nonnull__(pTHX_4);
+                       __attribute__nonnull__(pTHX_3);
 
 #  endif
 STATIC SV *    S_more_sv(pTHX);
@@ -3886,13 +3901,11 @@ STATIC void     S_glob_assign_ref(pTHX_ SV *dstr, SV *sstr)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2);
 
-#  if defined(USE_ITHREADS)
 STATIC PTR_TBL_ENT_t * S_ptr_table_find(PTR_TBL_t *tbl, const void *sv)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(1)
                        __attribute__nonnull__(2);
 
-#  endif
 #endif
 
 #if defined(PERL_IN_TOKE_C) || defined(PERL_DECL_PROT)
@@ -3907,7 +3920,6 @@ STATIC char*      S_force_word(pTHX_ char *start, int token, int check_keyword, int a
 STATIC SV*     S_tokeq(pTHX_ SV *sv)
                        __attribute__nonnull__(pTHX_1);
 
-STATIC int     S_pending_ident(pTHX);
 STATIC void    S_readpipe_override(pTHX);
 STATIC char*   S_scan_const(pTHX_ char *start)
                        __attribute__warn_unused_result__
@@ -3951,6 +3963,7 @@ STATIC char*      S_scan_word(pTHX_ char *s, char *dest, STRLEN destlen, int allow_pa
                        __attribute__nonnull__(pTHX_2)
                        __attribute__nonnull__(pTHX_5);
 
+STATIC void    S_update_debugger_info(pTHX_ SV *orig_sv, const char *buf, STRLEN len);
 STATIC char*   S_skipspace(pTHX_ char *s)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1);
@@ -4433,10 +4446,19 @@ PERL_CALLCONV int       Perl_my_vsnprintf(char *buffer, const Size_t len, const char *
 PERL_CALLCONV void     Perl_my_clearenv(pTHX);
 
 #ifdef PERL_IMPLICIT_CONTEXT
+#ifdef PERL_GLOBAL_STRUCT_PRIVATE
+PERL_CALLCONV void*    Perl_my_cxt_init(pTHX_ const char *my_cxt_key, size_t size)
+                       __attribute__nonnull__(pTHX_1);
+
+PERL_CALLCONV int      Perl_my_cxt_index(pTHX_ const char *my_cxt_key)
+                       __attribute__nonnull__(pTHX_1);
+
+#else
 PERL_CALLCONV void*    Perl_my_cxt_init(pTHX_ int *index, size_t size)
                        __attribute__nonnull__(pTHX_1);
 
 #endif
+#endif
 
 #ifndef HAS_STRLCAT
 PERL_CALLCONV Size_t   Perl_my_strlcat(char *dst, const char *src, Size_t size);