* proto.h
*
* Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- * 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, by Larry Wall and others
+ * 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 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.
PERL_CALLCONV OP* Perl_die(pTHX_ const char* pat, ...)
__attribute__format__null_ok__(__printf__,pTHX_1,pTHX_2);
-#if defined(PERL_IN_UTIL_C)
+#if defined(PERL_IN_UTIL_C) || defined(PERL_DECL_PROT)
STATIC OP* S_vdie(pTHX_ const char* pat, va_list* args);
#endif
PERL_CALLCONV OP* Perl_die_where(pTHX_ const char* message, STRLEN msglen);
#endif
PERL_CALLCONV void Perl_do_execfree(pTHX);
-#ifdef PERL_IN_DOIO_C
+#if defined(PERL_IN_DOIO_C) || defined(PERL_DECL_PROT)
STATIC void S_exec_failed(pTHX_ const char *cmd, int fd, int do_report)
__attribute__nonnull__(pTHX_1);
#define PERL_ARGS_ASSERT_EXEC_FAILED \
#define PERL_ARGS_ASSERT_FIND_SCRIPT \
assert(scriptname)
-#if defined(PERL_IN_OP_C)
+#if defined(PERL_IN_OP_C) || defined(PERL_DECL_PROT)
STATIC OP* S_force_list(pTHX_ OP* arg);
STATIC OP* S_fold_constants(pTHX_ OP *o)
__attribute__nonnull__(pTHX_1);
assert(pat)
PERL_CALLCONV void Perl_free_tmps(pTHX);
-#if defined(PERL_IN_OP_C)
+#if defined(PERL_IN_OP_C) || defined(PERL_DECL_PROT)
STATIC OP* S_gen_constant_list(pTHX_ OP* o);
#endif
#if !defined(HAS_GETENV_LEN)
#define PERL_ARGS_ASSERT_IBCMP_UTF8 \
assert(s1); assert(s2)
-#if defined(PERL_IN_DOIO_C)
+#if defined(PERL_IN_DOIO_C) || defined(PERL_DECL_PROT)
STATIC bool S_ingroup(pTHX_ Gid_t testgid, bool effective)
__attribute__warn_unused_result__;
PERL_CALLCONV void Perl_op_refcnt_lock(pTHX);
PERL_CALLCONV void Perl_op_refcnt_unlock(pTHX);
-#if defined(PERL_IN_OP_C)
+#if defined(PERL_IN_OP_C) || defined(PERL_DECL_PROT)
STATIC OP* S_linklist(pTHX_ OP *o)
__attribute__nonnull__(pTHX_1);
#define PERL_ARGS_ASSERT_LINKLIST \
PERL_CALLCONV void Perl_pad_leavemy(pTHX);
PERL_CALLCONV SV* Perl_pad_sv(pTHX_ PADOFFSET po);
PERL_CALLCONV void Perl_pad_free(pTHX_ PADOFFSET po);
-#if defined(PERL_IN_PAD_C)
+#if defined(PERL_IN_PAD_C) || defined(PERL_DECL_PROT)
STATIC void S_pad_reset(pTHX);
#endif
PERL_CALLCONV void Perl_pad_swipe(pTHX_ PADOFFSET po, bool refadjust);
#define PERL_ARGS_ASSERT_EVAL_SV \
assert(sv)
-PERL_CALLCONV SV* Perl_get_sv(pTHX_ const char* name, I32 create)
+PERL_CALLCONV SV* Perl_get_sv(pTHX_ const char *name, I32 flags)
__attribute__nonnull__(pTHX_1);
#define PERL_ARGS_ASSERT_GET_SV \
assert(name)
-PERL_CALLCONV AV* Perl_get_av(pTHX_ const char* name, I32 create)
+PERL_CALLCONV AV* Perl_get_av(pTHX_ const char *name, I32 flags)
__attribute__nonnull__(pTHX_1);
#define PERL_ARGS_ASSERT_GET_AV \
assert(name)
-PERL_CALLCONV HV* Perl_get_hv(pTHX_ const char* name, I32 create)
+PERL_CALLCONV HV* Perl_get_hv(pTHX_ const char *name, I32 flags)
__attribute__nonnull__(pTHX_1);
#define PERL_ARGS_ASSERT_GET_HV \
assert(name)
#define PERL_ARGS_ASSERT_PMRUNTIME \
assert(o); assert(expr)
-#if defined(PERL_IN_OP_C)
+#if defined(PERL_IN_OP_C) || defined(PERL_DECL_PROT)
STATIC OP* S_pmtrans(pTHX_ OP* o, OP* expr, OP* repl)
__attribute__nonnull__(pTHX_1)
__attribute__nonnull__(pTHX_2)
PERL_CALLCONV OP* Perl_prepend_elem(pTHX_ I32 optype, OP* head, OP* tail);
PERL_CALLCONV void Perl_push_scope(pTHX);
/* PERL_CALLCONV OP* Perl_ref(pTHX_ OP* o, I32 type); */
-#if defined(PERL_IN_OP_C)
+#if defined(PERL_IN_OP_C) || defined(PERL_DECL_PROT)
STATIC OP* S_refkids(pTHX_ OP* o, I32 type);
#endif
PERL_CALLCONV void Perl_regdump(pTHX_ const regexp* r)
assert(save)
PERL_CALLCONV Sighandler_t Perl_rsignal_state(pTHX_ int i);
-#if defined(PERL_IN_PP_CTL_C)
+#if defined(PERL_IN_PP_CTL_C) || defined(PERL_DECL_PROT)
STATIC void S_rxres_free(pTHX_ void** rsp)
__attribute__nonnull__(pTHX_1);
#define PERL_ARGS_ASSERT_RXRES_FREE \
#define PERL_ARGS_ASSERT_SAVE_DELETE \
assert(hv); assert(key)
+PERL_CALLCONV void Perl_save_adelete(pTHX_ AV *av, I32 key)
+ __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT_SAVE_ADELETE \
+ assert(av)
+
PERL_CALLCONV void Perl_save_destructor(pTHX_ DESTRUCTORFUNC_NOCONTEXT_t f, void* p)
__attribute__nonnull__(pTHX_2);
#define PERL_ARGS_ASSERT_SAVE_DESTRUCTOR \
__attribute__nonnull__(pTHX_1)
__attribute__nonnull__(pTHX_2)
__attribute__nonnull__(pTHX_3); */
-#define PERL_ARGS_ASSERT_SAVE_HELEM \
- assert(hv); assert(key); assert(sptr)
PERL_CALLCONV void Perl_save_helem_flags(pTHX_ HV *hv, SV *key, SV **sptr, const U32 flags)
__attribute__nonnull__(pTHX_1)
assert(sptr)
PERL_CALLCONV void Perl_save_pushptr(pTHX_ void *const ptr, const int type);
-PERL_CALLCONV void Perl_save_pushi32ptr(pTHX_ I32 i, void *const ptr, const int type);
+PERL_CALLCONV void Perl_save_pushi32ptr(pTHX_ const I32 i, void *const ptr, const int type);
PERL_CALLCONV void Perl_save_pushptrptr(pTHX_ void *const ptr1, void *const ptr2, const int type);
#if defined(PERL_IN_SCOPE_C) || defined(PERL_DECL_PROT)
STATIC void S_save_pushptri32ptr(pTHX_ void *const ptr1, const I32 i, void *const ptr2, const int type);
#endif
PERL_CALLCONV OP* Perl_sawparens(pTHX_ OP* o);
PERL_CALLCONV OP* Perl_scalar(pTHX_ OP* o);
-#if defined(PERL_IN_OP_C)
+#if defined(PERL_IN_OP_C) || defined(PERL_DECL_PROT)
STATIC OP* S_scalarkids(pTHX_ OP* o);
STATIC OP* S_scalarseq(pTHX_ OP* o);
#endif
#define PERL_ARGS_ASSERT_SCREAMINSTR \
assert(bigstr); assert(littlestr); assert(old_posp)
-#if !defined(VMS) && defined(PERL_IN_UTIL_C)
-STATIC I32 S_setenv_getix(pTHX_ const char* nam)
- __attribute__nonnull__(pTHX_1);
-#define PERL_ARGS_ASSERT_SETENV_GETIX \
- assert(nam)
-
-#endif
PERL_CALLCONV void Perl_setdefout(pTHX_ GV* gv);
PERL_CALLCONV HEK* Perl_share_hek(pTHX_ const char* str, I32 len, U32 hash)
__attribute__nonnull__(pTHX_1);
#define PERL_ARGS_ASSERT_SV_2IO \
assert(sv)
-#ifdef PERL_IN_SV_C
+#if defined(PERL_IN_SV_C) || defined(PERL_DECL_PROT)
STATIC bool S_glob_2number(pTHX_ GV* const gv)
__attribute__nonnull__(pTHX_1);
#define PERL_ARGS_ASSERT_GLOB_2NUMBER \
assert(sv); assert(lp)
PERL_CALLCONV I32 Perl_sv_true(pTHX_ SV *const sv);
-#if defined (PERL_IN_SV_C)
+#if defined(PERL_IN_SV_C) || defined(PERL_DECL_PROT)
STATIC void S_sv_add_arena(pTHX_ char *const ptr, const U32 size, const U32 flags)
__attribute__nonnull__(pTHX_1);
#define PERL_ARGS_ASSERT_SV_ADD_ARENA \
#define PERL_ARGS_ASSERT_SV_UTF8_UPGRADE \
assert(sv)
+/* PERL_CALLCONV STRLEN sv_utf8_upgrade_nomg(pTHX_ SV *sv)
+ __attribute__nonnull__(pTHX_1); */
+
PERL_CALLCONV bool Perl_sv_utf8_downgrade(pTHX_ SV *const sv, const bool fail_ok)
__attribute__nonnull__(pTHX_1);
#define PERL_ARGS_ASSERT_SV_UTF8_DOWNGRADE \
assert(linestr_sv); assert(rsfp)
STATIC void S_forbid_setid(pTHX_ const char flag, const bool suidscript);
-STATIC void S_incpush(pTHX_ const char *dir, bool addsubdirs, bool addoldvers, bool usesep, bool canrelocate);
+STATIC void S_incpush(pTHX_ const char *dir, bool addsubdirs, bool addoldvers, bool usesep, bool canrelocate, bool unshift);
STATIC void S_init_interp(pTHX);
STATIC void S_init_ids(pTHX);
STATIC void S_init_main_stash(pTHX);
#define PERL_ARGS_ASSERT_USAGE \
assert(name)
-#ifdef DOSUID
-# ifdef IAMSUID
-STATIC void S_validate_suid(pTHX_ const char *validarg, int fdscript, bool suidscript, SV* linestr_sv, PerlIO *rsfp)
- __attribute__nonnull__(pTHX_1)
- __attribute__nonnull__(pTHX_4)
- __attribute__nonnull__(pTHX_5);
-#define PERL_ARGS_ASSERT_VALIDATE_SUID \
- assert(validarg); assert(linestr_sv); assert(rsfp)
-
-# else
-STATIC void S_validate_suid(pTHX_ const char *validarg, const char *scriptname, int fdscript, SV* linestr_sv, PerlIO *rsfp)
- __attribute__nonnull__(pTHX_1)
- __attribute__nonnull__(pTHX_2)
- __attribute__nonnull__(pTHX_4)
- __attribute__nonnull__(pTHX_5);
-#define PERL_ARGS_ASSERT_VALIDATE_SUID \
- assert(validarg); assert(scriptname); assert(linestr_sv); assert(rsfp)
-
-# endif
-#else
-# ifndef SETUID_SCRIPTS_ARE_SECURE_NOW
+#ifndef SETUID_SCRIPTS_ARE_SECURE_NOW
STATIC void S_validate_suid(pTHX_ PerlIO *rsfp)
__attribute__nonnull__(pTHX_1);
#define PERL_ARGS_ASSERT_VALIDATE_SUID \
assert(rsfp)
-# endif
#endif
-# if defined(IAMSUID)
-STATIC int S_fd_on_nosuid_fs(pTHX_ int fd);
-# endif
STATIC void* S_parse_body(pTHX_ char **env, XSINIT_t xsinit);
STATIC void S_run_body(pTHX_ I32 oldscope)
__attribute__noreturn__;
#define PERL_ARGS_ASSERT_ISA_LOOKUP \
assert(stash); assert(name)
+STATIC HV * S_get_isa_hash(pTHX_ HV *const stash)
+ __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT_GET_ISA_HASH \
+ assert(stash)
+
#endif
#if defined(PERL_IN_LOCALE_C) || defined(PERL_DECL_PROT)
#define PERL_ARGS_ASSERT_SV_CATSV_FLAGS \
assert(dsv)
-PERL_CALLCONV STRLEN Perl_sv_utf8_upgrade_flags(pTHX_ SV *const sv, const I32 flags)
+/* PERL_CALLCONV STRLEN Perl_sv_utf8_upgrade_flags(pTHX_ SV *const sv, const I32 flags)
+ __attribute__nonnull__(pTHX_1); */
+
+PERL_CALLCONV STRLEN Perl_sv_utf8_upgrade_flags_grow(pTHX_ SV *const sv, const I32 flags, STRLEN extra)
__attribute__nonnull__(pTHX_1);
-#define PERL_ARGS_ASSERT_SV_UTF8_UPGRADE_FLAGS \
+#define PERL_ARGS_ASSERT_SV_UTF8_UPGRADE_FLAGS_GROW \
assert(sv)
PERL_CALLCONV char* Perl_sv_pvn_force_flags(pTHX_ SV *const sv, STRLEN *const lp, const I32 flags)
#endif /* PERLIO_LAYERS */
PERL_CALLCONV void Perl_deb_stack_all(pTHX);
-#ifdef PERL_IN_DEB_C
+#if defined(PERL_IN_DEB_C) || defined(PERL_DECL_PROT)
STATIC void S_deb_stack_n(pTHX_ SV** stack_base, I32 stack_min, I32 stack_max, I32 mark_min, I32 mark_max)
__attribute__nonnull__(pTHX_1);
#define PERL_ARGS_ASSERT_DEB_STACK_N \
PERL_CALLCONV REGEXP * Perl_get_re_arg(pTHX_ SV *sv);
+PERL_CALLCONV SV* Perl_mro_get_private_data(pTHX_ struct mro_meta *const smeta, const struct mro_alg *const which)
+ __attribute__nonnull__(pTHX_1)
+ __attribute__nonnull__(pTHX_2);
+#define PERL_ARGS_ASSERT_MRO_GET_PRIVATE_DATA \
+ assert(smeta); assert(which)
+
+PERL_CALLCONV SV* Perl_mro_set_private_data(pTHX_ struct mro_meta *const smeta, const struct mro_alg *const which, SV *const data)
+ __attribute__nonnull__(pTHX_1)
+ __attribute__nonnull__(pTHX_2)
+ __attribute__nonnull__(pTHX_3);
+#define PERL_ARGS_ASSERT_MRO_SET_PRIVATE_DATA \
+ assert(smeta); assert(which); assert(data)
+
+PERL_CALLCONV const struct mro_alg * Perl_mro_get_from_name(pTHX_ SV *name)
+ __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT_MRO_GET_FROM_NAME \
+ assert(name)
+
+PERL_CALLCONV void Perl_mro_register(pTHX_ const struct mro_alg *mro)
+ __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT_MRO_REGISTER \
+ assert(mro)
+
+PERL_CALLCONV void Perl_mro_set_mro(pTHX_ struct mro_meta *const meta, SV *const name)
+ __attribute__nonnull__(pTHX_1)
+ __attribute__nonnull__(pTHX_2);
+#define PERL_ARGS_ASSERT_MRO_SET_MRO \
+ assert(meta); assert(name)
+
PERL_CALLCONV struct mro_meta* Perl_mro_meta_init(pTHX_ HV* stash)
__attribute__nonnull__(pTHX_1);
#define PERL_ARGS_ASSERT_MRO_META_INIT \
assert(stash)
#if defined(PERL_IN_MRO_C) || defined(PERL_DECL_PROT)
-STATIC AV* S_mro_get_linear_isa_c3(pTHX_ HV* stash, U32 level)
- __attribute__nonnull__(pTHX_1);
-#define PERL_ARGS_ASSERT_MRO_GET_LINEAR_ISA_C3 \
- assert(stash)
-
STATIC AV* S_mro_get_linear_isa_dfs(pTHX_ HV* stash, U32 level)
__attribute__nonnull__(pTHX_1);
#define PERL_ARGS_ASSERT_MRO_GET_LINEAR_ISA_DFS \
#define PERL_ARGS_ASSERT_STORE_COP_LABEL \
assert(label)
-PERL_CALLCONV HV * Perl_get_isa_hash(pTHX_ HV *const stash)
- __attribute__nonnull__(pTHX_1);
-#define PERL_ARGS_ASSERT_GET_ISA_HASH \
- assert(stash)
-
END_EXTERN_C
/*