#if defined(PERL_IMPLICIT_SYS)
PERL_CALLCONV PerlInterpreter* perl_alloc_using(struct IPerlMem* m, struct IPerlMem* ms, struct IPerlMem* mp, struct IPerlEnv* e, struct IPerlStdIO* io, struct IPerlLIO* lio, struct IPerlDir* d, struct IPerlSock* s, struct IPerlProc* p);
-#else
-PERL_CALLCONV PerlInterpreter* perl_alloc(void);
#endif
+PERL_CALLCONV PerlInterpreter* perl_alloc(void);
PERL_CALLCONV void perl_construct(PerlInterpreter* interp);
PERL_CALLCONV void perl_destruct(PerlInterpreter* interp);
PERL_CALLCONV void perl_free(PerlInterpreter* interp);
PERL_CALLCONV MEM_SIZE Perl_malloced_size(void *p);
#endif
+PERL_CALLCONV void* Perl_get_context(void);
+PERL_CALLCONV void Perl_set_context(void *thx);
+
END_EXTERN_C
/* functions with flag 'n' should come before here */
PERL_CALLCONV OP* Perl_append_elem(pTHX_ I32 optype, OP* head, OP* tail);
PERL_CALLCONV OP* Perl_append_list(pTHX_ I32 optype, LISTOP* first, LISTOP* last);
PERL_CALLCONV I32 Perl_apply(pTHX_ I32 type, SV** mark, SV** sp);
+PERL_CALLCONV void Perl_apply_attrs_string(pTHX_ char *stashpv, CV *cv, char *attrstr, STRLEN len);
PERL_CALLCONV SV* Perl_avhv_delete_ent(pTHX_ AV *ar, SV* keysv, I32 flags, U32 hash);
PERL_CALLCONV bool Perl_avhv_exists_ent(pTHX_ AV *ar, SV* keysv, U32 hash);
PERL_CALLCONV SV** Perl_avhv_fetch_ent(pTHX_ AV *ar, SV* keysv, I32 lval, U32 hash);
+PERL_CALLCONV SV** Perl_avhv_store_ent(pTHX_ AV *ar, SV* keysv, SV* val, U32 hash);
PERL_CALLCONV HE* Perl_avhv_iternext(pTHX_ AV *ar);
PERL_CALLCONV SV* Perl_avhv_iterval(pTHX_ AV *ar, HE* entry);
PERL_CALLCONV HV* Perl_avhv_keys(pTHX_ AV *ar);
__attribute__((format(printf,1,2)))
#endif
;
+PERL_CALLCONV void Perl_load_module_nocontext(U32 flags, SV* name, SV* ver, ...)
+#ifdef CHECK_FORMAT
+ __attribute__((format(printf,3,4)))
+#endif
+;
PERL_CALLCONV SV* Perl_mess_nocontext(const char* pat, ...)
#ifdef CHECK_FORMAT
__attribute__((format(printf,1,2)))
PERL_CALLCONV void Perl_dounwind(pTHX_ I32 cxix);
PERL_CALLCONV bool Perl_do_aexec(pTHX_ SV* really, SV** mark, SV** sp);
PERL_CALLCONV bool Perl_do_aexec5(pTHX_ SV* really, SV** mark, SV** sp, int fd, int flag);
-PERL_CALLCONV int Perl_do_binmode(pTHX_ PerlIO *fp, int iotype, int flag);
+PERL_CALLCONV int Perl_do_binmode(pTHX_ PerlIO *fp, int iotype, int mode);
PERL_CALLCONV void Perl_do_chop(pTHX_ SV* asv, SV* sv);
PERL_CALLCONV bool Perl_do_close(pTHX_ GV* gv, bool not_implicit);
PERL_CALLCONV bool Perl_do_eof(pTHX_ GV* gv);
PERL_CALLCONV void Perl_free_tmps(pTHX);
PERL_CALLCONV OP* Perl_gen_constant_list(pTHX_ OP* o);
#if !defined(HAS_GETENV_LEN)
-PERL_CALLCONV char* Perl_getenv_len(pTHX_ char* key, unsigned long *len);
+PERL_CALLCONV char* Perl_getenv_len(pTHX_ const char* key, unsigned long *len);
#endif
PERL_CALLCONV void Perl_gp_free(pTHX_ GV* gv);
PERL_CALLCONV GP* Perl_gp_ref(pTHX_ GP* gp);
PERL_CALLCONV void Perl_gv_check(pTHX_ HV* stash);
PERL_CALLCONV void Perl_gv_efullname(pTHX_ SV* sv, GV* gv);
PERL_CALLCONV void Perl_gv_efullname3(pTHX_ SV* sv, GV* gv, const char* prefix);
+PERL_CALLCONV void Perl_gv_efullname4(pTHX_ SV* sv, GV* gv, const char* prefix, bool keepmain);
PERL_CALLCONV GV* Perl_gv_fetchfile(pTHX_ const char* name);
PERL_CALLCONV GV* Perl_gv_fetchmeth(pTHX_ HV* stash, const char* name, STRLEN len, I32 level);
PERL_CALLCONV GV* Perl_gv_fetchmethod(pTHX_ HV* stash, const char* name);
PERL_CALLCONV GV* Perl_gv_fetchpv(pTHX_ const char* name, I32 add, I32 sv_type);
PERL_CALLCONV void Perl_gv_fullname(pTHX_ SV* sv, GV* gv);
PERL_CALLCONV void Perl_gv_fullname3(pTHX_ SV* sv, GV* gv, const char* prefix);
+PERL_CALLCONV void Perl_gv_fullname4(pTHX_ SV* sv, GV* gv, const char* prefix, bool keepmain);
PERL_CALLCONV void Perl_gv_init(pTHX_ GV* gv, HV* stash, const char* name, STRLEN len, int multi);
PERL_CALLCONV HV* Perl_gv_stashpv(pTHX_ const char* name, I32 create);
PERL_CALLCONV HV* Perl_gv_stashpvn(pTHX_ const char* name, U32 namelen, I32 create);
PERL_CALLCONV char* Perl_instr(pTHX_ const char* big, const char* little);
PERL_CALLCONV bool Perl_io_close(pTHX_ IO* io, bool not_implicit);
PERL_CALLCONV OP* Perl_invert(pTHX_ OP* cmd);
+PERL_CALLCONV bool Perl_is_gv_magical(pTHX_ char *name, STRLEN len, U32 flags);
PERL_CALLCONV bool Perl_is_uni_alnum(pTHX_ U32 c);
PERL_CALLCONV bool Perl_is_uni_alnumc(pTHX_ U32 c);
PERL_CALLCONV bool Perl_is_uni_idfirst(pTHX_ U32 c);
PERL_CALLCONV U32 Perl_to_uni_upper_lc(pTHX_ U32 c);
PERL_CALLCONV U32 Perl_to_uni_title_lc(pTHX_ U32 c);
PERL_CALLCONV U32 Perl_to_uni_lower_lc(pTHX_ U32 c);
+PERL_CALLCONV int Perl_is_utf8_char(pTHX_ U8 *p);
+PERL_CALLCONV bool Perl_is_utf8_string(pTHX_ U8 *s, STRLEN len);
PERL_CALLCONV bool Perl_is_utf8_alnum(pTHX_ U8 *p);
PERL_CALLCONV bool Perl_is_utf8_alnumc(pTHX_ U8 *p);
PERL_CALLCONV bool Perl_is_utf8_idfirst(pTHX_ U8 *p);
PERL_CALLCONV OP* Perl_linklist(pTHX_ OP* o);
PERL_CALLCONV OP* Perl_list(pTHX_ OP* o);
PERL_CALLCONV OP* Perl_listkids(pTHX_ OP* o);
+PERL_CALLCONV void Perl_load_module(pTHX_ U32 flags, SV* name, SV* ver, ...)
+#ifdef CHECK_FORMAT
+ __attribute__((format(printf,pTHX_3,pTHX_4)))
+#endif
+;
+PERL_CALLCONV void Perl_vload_module(pTHX_ U32 flags, SV* name, SV* ver, va_list* args);
PERL_CALLCONV OP* Perl_localize(pTHX_ OP* arg, I32 lexical);
PERL_CALLCONV I32 Perl_looks_like_number(pTHX_ SV* sv);
PERL_CALLCONV int Perl_magic_clearenv(pTHX_ SV* sv, MAGIC* mg);
PERL_CALLCONV int Perl_magic_nextpack(pTHX_ SV* sv, MAGIC* mg, SV* key);
PERL_CALLCONV U32 Perl_magic_regdata_cnt(pTHX_ SV* sv, MAGIC* mg);
PERL_CALLCONV int Perl_magic_regdatum_get(pTHX_ SV* sv, MAGIC* mg);
+PERL_CALLCONV int Perl_magic_regdatum_set(pTHX_ SV* sv, MAGIC* mg);
PERL_CALLCONV int Perl_magic_set(pTHX_ SV* sv, MAGIC* mg);
PERL_CALLCONV int Perl_magic_setamagic(pTHX_ SV* sv, MAGIC* mg);
PERL_CALLCONV int Perl_magic_setarylen(pTHX_ SV* sv, MAGIC* mg);
PERL_CALLCONV int Perl_mg_set(pTHX_ SV* sv);
PERL_CALLCONV I32 Perl_mg_size(pTHX_ SV* sv);
PERL_CALLCONV OP* Perl_mod(pTHX_ OP* o, I32 type);
+PERL_CALLCONV int Perl_mode_from_discipline(pTHX_ SV* discp);
PERL_CALLCONV char* Perl_moreswitches(pTHX_ char* s);
PERL_CALLCONV OP* Perl_my(pTHX_ OP* o);
PERL_CALLCONV NV Perl_my_atof(pTHX_ const char *s);
PERL_CALLCONV OP* Perl_newSVREF(pTHX_ OP* o);
PERL_CALLCONV OP* Perl_newSVOP(pTHX_ I32 type, I32 flags, SV* sv);
PERL_CALLCONV SV* Perl_newSViv(pTHX_ IV i);
+PERL_CALLCONV SV* Perl_newSVuv(pTHX_ UV u);
PERL_CALLCONV SV* Perl_newSVnv(pTHX_ NV n);
PERL_CALLCONV SV* Perl_newSVpv(pTHX_ const char* s, STRLEN len);
PERL_CALLCONV SV* Perl_newSVpvn(pTHX_ const char* s, STRLEN len);
+PERL_CALLCONV SV* Perl_newSVpvn_share(pTHX_ const char* s, STRLEN len, U32 hash);
PERL_CALLCONV SV* Perl_newSVpvf(pTHX_ const char* pat, ...)
#ifdef CHECK_FORMAT
__attribute__((format(printf,pTHX_1,pTHX_2)))
PERL_CALLCONV void Perl_save_freeop(pTHX_ OP* o);
PERL_CALLCONV void Perl_save_freepv(pTHX_ char* pv);
PERL_CALLCONV void Perl_save_generic_svref(pTHX_ SV** sptr);
+PERL_CALLCONV void Perl_save_generic_pvref(pTHX_ char** str);
PERL_CALLCONV void Perl_save_gp(pTHX_ GV* gv, I32 empty);
PERL_CALLCONV HV* Perl_save_hash(pTHX_ GV* gv);
PERL_CALLCONV void Perl_save_helem(pTHX_ HV* hv, SV *key, SV **sptr);
PERL_CALLCONV void Perl_sv_usepvn(pTHX_ SV* sv, char* ptr, STRLEN len);
PERL_CALLCONV void Perl_sv_vcatpvfn(pTHX_ SV* sv, const char* pat, STRLEN patlen, va_list* args, SV** svargs, I32 svmax, bool *maybe_tainted);
PERL_CALLCONV void Perl_sv_vsetpvfn(pTHX_ SV* sv, const char* pat, STRLEN patlen, va_list* args, SV** svargs, I32 svmax, bool *maybe_tainted);
+PERL_CALLCONV NV Perl_str_to_version(pTHX_ SV *sv);
PERL_CALLCONV SV* Perl_swash_init(pTHX_ char* pkg, char* name, SV* listsv, I32 minbits, I32 none);
PERL_CALLCONV UV Perl_swash_fetch(pTHX_ SV *sv, U8 *ptr);
PERL_CALLCONV void Perl_taint_env(pTHX);
PERL_CALLCONV void Perl_unsharepvn(pTHX_ const char* sv, I32 len, U32 hash);
PERL_CALLCONV void Perl_unshare_hek(pTHX_ HEK* hek);
PERL_CALLCONV void Perl_utilize(pTHX_ int aver, I32 floor, OP* version, OP* id, OP* arg);
-PERL_CALLCONV U8* Perl_utf16_to_utf8(pTHX_ U16* p, U8 *d, I32 bytelen);
-PERL_CALLCONV U8* Perl_utf16_to_utf8_reversed(pTHX_ U16* p, U8 *d, I32 bytelen);
+PERL_CALLCONV U8* Perl_utf16_to_utf8(pTHX_ U8* p, U8 *d, I32 bytelen, I32 *newlen);
+PERL_CALLCONV U8* Perl_utf16_to_utf8_reversed(pTHX_ U8* p, U8 *d, I32 bytelen, I32 *newlen);
PERL_CALLCONV I32 Perl_utf8_distance(pTHX_ U8 *a, U8 *b);
PERL_CALLCONV U8* Perl_utf8_hop(pTHX_ U8 *s, I32 off);
+PERL_CALLCONV U8* Perl_utf8_to_bytes(pTHX_ U8 *s, STRLEN *len);
+PERL_CALLCONV U8* Perl_bytes_to_utf8(pTHX_ U8 *s, STRLEN *len);
PERL_CALLCONV UV Perl_utf8_to_uv(pTHX_ U8 *s, I32* retlen);
PERL_CALLCONV U8* Perl_uv_to_utf8(pTHX_ U8 *d, UV uv);
PERL_CALLCONV void Perl_vivify_defelem(pTHX_ SV* sv);
PERL_CALLCONV void Perl_vivify_ref(pTHX_ SV* sv, U32 to_what);
PERL_CALLCONV I32 Perl_wait4pid(pTHX_ Pid_t pid, int* statusp, int flags);
-PERL_CALLCONV void Perl_report_closed_fh(pTHX_ GV *gv, IO *io, const char *func, const char *obj);
+PERL_CALLCONV void Perl_report_evil_fh(pTHX_ GV *gv, IO *io, I32 op);
PERL_CALLCONV void Perl_report_uninit(pTHX);
PERL_CALLCONV void Perl_warn(pTHX_ const char* pat, ...)
#ifdef CHECK_FORMAT
#endif
PERL_CALLCONV int Perl_runops_standard(pTHX);
PERL_CALLCONV int Perl_runops_debug(pTHX);
+#if defined(USE_THREADS)
+PERL_CALLCONV SV* Perl_sv_lock(pTHX_ SV *sv);
+#endif
PERL_CALLCONV void Perl_sv_catpvf_mg(pTHX_ SV *sv, const char* pat, ...)
#ifdef CHECK_FORMAT
__attribute__((format(printf,pTHX_2,pTHX_3)))
PERL_CALLCONV void Perl_do_pmop_dump(pTHX_ I32 level, PerlIO *file, PMOP *pm);
PERL_CALLCONV void Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bool dumpops, STRLEN pvlim);
PERL_CALLCONV void Perl_magic_dump(pTHX_ MAGIC *mg);
+#if defined(PERL_FLEXIBLE_EXCEPTIONS)
PERL_CALLCONV void* Perl_default_protect(pTHX_ volatile JMPENV *je, int *excpt, protect_body_t body, ...);
PERL_CALLCONV void* Perl_vdefault_protect(pTHX_ volatile JMPENV *je, int *excpt, protect_body_t body, va_list *args);
+#endif
PERL_CALLCONV void Perl_reginitcolors(pTHX);
PERL_CALLCONV char* Perl_sv_2pv_nolen(pTHX_ SV* sv);
PERL_CALLCONV char* Perl_sv_2pvutf8_nolen(pTHX_ SV* sv);
PERL_CALLCONV void Perl_ptr_table_store(pTHX_ PTR_TBL_t *tbl, void *oldsv, void *newsv);
PERL_CALLCONV void Perl_ptr_table_split(pTHX_ PTR_TBL_t *tbl);
#endif
+#if defined(HAVE_INTERP_INTERN)
+PERL_CALLCONV void Perl_sys_intern_clear(pTHX);
+PERL_CALLCONV void Perl_sys_intern_init(pTHX);
+#endif
#if defined(PERL_OBJECT)
protected:
#if defined(PERL_IN_AV_C) || defined(PERL_DECL_PROT)
STATIC I32 S_avhv_index_sv(pTHX_ SV* sv);
+STATIC I32 S_avhv_index(pTHX_ AV* av, SV* sv, U32 hash);
#endif
#if defined(PERL_IN_DOOP_C) || defined(PERL_DECL_PROT)
-STATIC I32 S_do_trans_CC_simple(pTHX_ SV *sv);
-STATIC I32 S_do_trans_CC_count(pTHX_ SV *sv);
-STATIC I32 S_do_trans_CC_complex(pTHX_ SV *sv);
-STATIC I32 S_do_trans_UU_simple(pTHX_ SV *sv);
-STATIC I32 S_do_trans_UU_count(pTHX_ SV *sv);
-STATIC I32 S_do_trans_UU_complex(pTHX_ SV *sv);
-STATIC I32 S_do_trans_UC_simple(pTHX_ SV *sv);
-STATIC I32 S_do_trans_CU_simple(pTHX_ SV *sv);
-STATIC I32 S_do_trans_UC_trivial(pTHX_ SV *sv);
-STATIC I32 S_do_trans_CU_trivial(pTHX_ SV *sv);
+STATIC I32 S_do_trans_simple(pTHX_ SV *sv);
+STATIC I32 S_do_trans_count(pTHX_ SV *sv);
+STATIC I32 S_do_trans_complex(pTHX_ SV *sv);
+STATIC I32 S_do_trans_simple_utf8(pTHX_ SV *sv);
+STATIC I32 S_do_trans_count_utf8(pTHX_ SV *sv);
+STATIC I32 S_do_trans_complex_utf8(pTHX_ SV *sv);
#endif
#if defined(PERL_IN_GV_C) || defined(PERL_DECL_PROT)
#if defined(PERL_IN_PERL_C) || defined(PERL_DECL_PROT)
STATIC void S_find_beginning(pTHX);
STATIC void S_forbid_setid(pTHX_ char *);
-STATIC void S_incpush(pTHX_ char *, int);
+STATIC void S_incpush(pTHX_ char *, int, int);
STATIC void S_init_interp(pTHX);
STATIC void S_init_ids(pTHX);
STATIC void S_init_lexer(pTHX);
# if defined(IAMSUID)
STATIC int S_fd_on_nosuid_fs(pTHX_ int fd);
# endif
-STATIC void* S_parse_body(pTHX_ va_list args);
-STATIC void* S_run_body(pTHX_ va_list args);
-STATIC void* S_call_body(pTHX_ va_list args);
-STATIC void S_call_xbody(pTHX_ OP *myop, int is_eval);
-STATIC void* S_call_list_body(pTHX_ va_list args);
+STATIC void* S_parse_body(pTHX_ char **env, XSINIT_t xsinit);
+STATIC void* S_run_body(pTHX_ I32 oldscope);
+STATIC void S_call_body(pTHX_ OP *myop, int is_eval);
+STATIC void* S_call_list_body(pTHX_ CV *cv);
+#if defined(PERL_FLEXIBLE_EXCEPTIONS)
+STATIC void* S_vparse_body(pTHX_ va_list args);
+STATIC void* S_vrun_body(pTHX_ va_list args);
+STATIC void* S_vcall_body(pTHX_ va_list args);
+STATIC void* S_vcall_list_body(pTHX_ va_list args);
+#endif
# if defined(USE_THREADS)
STATIC struct perl_thread * S_init_main_thread(pTHX);
# endif
#if defined(PERL_IN_PP_CTL_C) || defined(PERL_DECL_PROT)
STATIC OP* S_docatch(pTHX_ OP *o);
-STATIC void* S_docatch_body(pTHX_ va_list args);
+STATIC void* S_docatch_body(pTHX);
+#if defined(PERL_FLEXIBLE_EXCEPTIONS)
+STATIC void* S_vdocatch_body(pTHX_ va_list args);
+#endif
STATIC OP* S_dofindlabel(pTHX_ OP *o, char *label, OP **opstack, OP **oplimit);
STATIC void S_doparseform(pTHX_ SV *sv);
STATIC I32 S_dopoptoeval(pTHX_ I32 startingblock);
#endif
#if defined(PERL_IN_PP_HOT_C) || defined(PERL_DECL_PROT)
+STATIC int S_do_maybe_phash(pTHX_ AV *ary, SV **lelem, SV **firstlelem, SV **relem, SV **lastrelem);
+STATIC void S_do_oddball(pTHX_ HV *hash, SV **relem, SV **firstrelem);
STATIC CV* S_get_db_sub(pTHX_ SV **svp, CV *cv);
STATIC SV* S_method_common(pTHX_ SV* meth, U32* hashp);
#endif
STATIC char* S_scan_trans(pTHX_ char *start);
STATIC char* S_scan_word(pTHX_ char *s, char *dest, STRLEN destlen, int allow_package, STRLEN *slp);
STATIC char* S_skipspace(pTHX_ char *s);
+STATIC char* S_swallow_bom(pTHX_ U8 *s);
STATIC void S_checkcomma(pTHX_ char *s, char *name, char *what);
STATIC void S_force_ident(pTHX_ char *s, int kind);
STATIC void S_incline(pTHX_ char *s);
STATIC I32 S_sublex_push(pTHX);
STATIC I32 S_sublex_start(pTHX);
STATIC char * S_filter_gets(pTHX_ SV *sv, PerlIO *fp, STRLEN append);
+STATIC HV * S_find_in_my_stash(pTHX_ char *pkgname, I32 len);
STATIC SV* S_new_constant(pTHX_ char *s, STRLEN len, const char *key, SV *sv, SV *pv, const char *type);
STATIC int S_ao(pTHX_ int toketype);
STATIC void S_depcom(pTHX);
STATIC char* S_incl_perldb(pTHX);
+#if 0
STATIC I32 S_utf16_textfilter(pTHX_ int idx, SV *sv, int maxlen);
STATIC I32 S_utf16rev_textfilter(pTHX_ int idx, SV *sv, int maxlen);
+#endif
# if defined(CRIPPLED_CC)
STATIC int S_uni(pTHX_ I32 f, char *s);
# endif