* proto.h
*
* Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- * 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, by Larry Wall and others
+ * 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 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.
#define PERL_ARGS_ASSERT_AV_FILL \
assert(av)
-PERL_CALLCONV I32 Perl_av_len(pTHX_ const AV *av)
+PERL_CALLCONV I32 Perl_av_len(pTHX_ AV *av)
__attribute__warn_unused_result__
__attribute__nonnull__(pTHX_1);
#define PERL_ARGS_ASSERT_AV_LEN \
PERL_CALLCONV void Perl_vcroak(pTHX_ const char* pat, va_list* args)
__attribute__noreturn__;
+PERL_CALLCONV void Perl_croak_xs_usage(pTHX_ const CV *const cv, const char *const params)
+ __attribute__noreturn__
+ __attribute__nonnull__(pTHX_1)
+ __attribute__nonnull__(pTHX_2);
+#define PERL_ARGS_ASSERT_CROAK_XS_USAGE \
+ assert(cv); assert(params)
+
+
#if defined(PERL_IMPLICIT_CONTEXT)
PERL_CALLCONV void Perl_croak_nocontext(const char* pat, ...)
__attribute__noreturn__
#define PERL_ARGS_ASSERT_GV_CONST_SV \
assert(gv)
-PERL_CALLCONV SV* Perl_cv_const_sv(pTHX_ CV* cv)
+PERL_CALLCONV SV* Perl_cv_const_sv(pTHX_ const CV *const cv)
__attribute__warn_unused_result__;
PERL_CALLCONV SV* Perl_op_const_sv(pTHX_ const OP* o, CV* cv)
assert(name)
/* PERL_CALLCONV GV* Perl_gv_fetchmethod(pTHX_ HV* stash, const char* name)
+ __attribute__nonnull__(pTHX_1)
__attribute__nonnull__(pTHX_2); */
#define PERL_ARGS_ASSERT_GV_FETCHMETHOD \
- assert(name)
+ assert(stash); assert(name)
PERL_CALLCONV GV* Perl_gv_fetchmethod_autoload(pTHX_ HV* stash, const char* name, I32 autoload)
+ __attribute__nonnull__(pTHX_1)
__attribute__nonnull__(pTHX_2);
#define PERL_ARGS_ASSERT_GV_FETCHMETHOD_AUTOLOAD \
- assert(name)
+ assert(stash); assert(name)
+
+PERL_CALLCONV GV* Perl_gv_fetchmethod_flags(pTHX_ HV* stash, const char* name, U32 flags)
+ __attribute__nonnull__(pTHX_1)
+ __attribute__nonnull__(pTHX_2);
+#define PERL_ARGS_ASSERT_GV_FETCHMETHOD_FLAGS \
+ assert(stash); assert(name)
PERL_CALLCONV GV* Perl_gv_fetchpv(pTHX_ const char *nambeg, I32 add, const svtype sv_type)
__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);
+#if defined(PERL_IN_HV_C) || defined(PERL_DECL_PROT)
+STATIC struct refcounted_he * S_refcounted_he_new_common(pTHX_ struct refcounted_he *const parent, const char *const key_p, const STRLEN key_len, const char flags, char value_type, const void *value, const STRLEN value_len)
+ __attribute__nonnull__(pTHX_2)
+ __attribute__nonnull__(pTHX_6);
+#define PERL_ARGS_ASSERT_REFCOUNTED_HE_NEW_COMMON \
+ assert(key_p); assert(value)
+
+#endif
/* PERL_CALLCONV SV** Perl_hv_store(pTHX_ HV *hv, const char *key, I32 klen, SV *val, U32 hash); */
/* PERL_CALLCONV HE* Perl_hv_store_ent(pTHX_ HV *hv, SV *key, SV *val, U32 hash); */
/* PERL_CALLCONV SV** Perl_hv_store_flags(pTHX_ HV *hv, const char *key, I32 klen, SV *val, U32 hash, int flags); */
assert(ptm)
PERL_CALLCONV OP* Perl_mod(pTHX_ OP* o, I32 type);
-PERL_CALLCONV int Perl_mode_from_discipline(pTHX_ SV* discp);
+PERL_CALLCONV int Perl_mode_from_discipline(pTHX_ const char* s, STRLEN len);
PERL_CALLCONV const char* Perl_moreswitches(pTHX_ const char* s)
__attribute__nonnull__(pTHX_1);
#define PERL_ARGS_ASSERT_MORESWITCHES \
assert(r); assert(param)
#endif
-PERL_CALLCONV REGEXP* Perl_pregcomp(pTHX_ const SV * const pattern, const U32 flags)
+PERL_CALLCONV REGEXP* Perl_pregcomp(pTHX_ SV * const pattern, const U32 flags)
__attribute__nonnull__(pTHX_1);
#define PERL_ARGS_ASSERT_PREGCOMP \
assert(pattern)
-PERL_CALLCONV REGEXP* Perl_re_compile(pTHX_ const SV * const pattern, U32 flags)
+PERL_CALLCONV REGEXP* Perl_re_compile(pTHX_ SV * const pattern, U32 flags)
__attribute__nonnull__(pTHX_1);
#define PERL_ARGS_ASSERT_RE_COMPILE \
assert(pattern)
__attribute__warn_unused_result__;
PERL_CALLCONV void Perl_report_evil_fh(pTHX_ const GV *gv, const IO *io, I32 op);
-PERL_CALLCONV void Perl_report_uninit(pTHX_ SV* uninit_sv);
+PERL_CALLCONV void Perl_report_uninit(pTHX_ const SV *uninit_sv);
PERL_CALLCONV void Perl_warn(pTHX_ const char* pat, ...)
__attribute__format__(__printf__,pTHX_1,pTHX_2)
__attribute__nonnull__(pTHX_1);
STATIC OP* S_newDEFSVOP(pTHX)
__attribute__warn_unused_result__;
+STATIC OP* S_search_const(pTHX_ OP *o)
+ __attribute__warn_unused_result__
+ __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT_SEARCH_CONST \
+ assert(o)
+
STATIC OP* S_new_logop(pTHX_ I32 type, I32 flags, OP **firstp, OP **otherp)
__attribute__warn_unused_result__
__attribute__nonnull__(pTHX_3)
#define PERL_ARGS_ASSERT_SV_DEL_BACKREF \
assert(tsv); assert(sv)
-STATIC SV * S_varname(pTHX_ GV *gv, const char gvtype, PADOFFSET targ, SV *keyname, I32 aindex, int subscript_type)
+STATIC SV * S_varname(pTHX_ const GV *const gv, const char gvtype, PADOFFSET targ, const SV *const keyname, I32 aindex, int subscript_type)
__attribute__warn_unused_result__;
# ifdef DEBUGGING
#endif
#if defined(PERL_IN_UNIVERSAL_C) || defined(PERL_DECL_PROT)
-STATIC bool S_isa_lookup(pTHX_ HV *stash, const char * const name, const HV * const name_stash)
+STATIC bool S_isa_lookup(pTHX_ HV *stash, const char * const name)
+ __attribute__nonnull__(pTHX_1)
__attribute__nonnull__(pTHX_2);
#define PERL_ARGS_ASSERT_ISA_LOOKUP \
- assert(name)
+ assert(stash); assert(name)
#endif
STATIC char * S_write_no_mem(pTHX)
__attribute__noreturn__;
+#if defined(PERL_MEM_LOG) && defined(PERL_MEM_LOG_STDERR)
+STATIC void S_mem_log_common(enum mem_log_type mlt, const UV n, const UV typesize, const char *type_name, const SV *sv, Malloc_t oldalloc, Malloc_t newalloc, const char *filename, const int linenumber, const char *funcname)
+ __attribute__nonnull__(4)
+ __attribute__nonnull__(8)
+ __attribute__nonnull__(10);
+#define PERL_ARGS_ASSERT_MEM_LOG_COMMON \
+ assert(type_name); assert(filename); assert(funcname)
+
+#endif
#endif
#if defined(PERL_IN_NUMERIC_C) || defined(PERL_DECL_PROT)
#define PERL_ARGS_ASSERT_HV_PLACEHOLDERS_P \
assert(hv)
-PERL_CALLCONV I32 Perl_hv_placeholders_get(pTHX_ HV *hv)
+PERL_CALLCONV I32 Perl_hv_placeholders_get(pTHX_ const HV *hv)
__attribute__warn_unused_result__
__attribute__nonnull__(pTHX_1);
#define PERL_ARGS_ASSERT_HV_PLACEHOLDERS_GET \
#if defined(PERL_IN_SV_C) || defined(PERL_DECL_PROT)
-STATIC SV * S_find_hash_subscript(pTHX_ HV *hv, SV *val)
+STATIC SV * S_find_hash_subscript(pTHX_ const HV *const hv, const SV *const val)
__attribute__nonnull__(pTHX_2);
#define PERL_ARGS_ASSERT_FIND_HASH_SUBSCRIPT \
assert(val)
-STATIC I32 S_find_array_subscript(pTHX_ AV *av, SV *val)
+STATIC I32 S_find_array_subscript(pTHX_ const AV *const av, const SV *const val)
__attribute__nonnull__(pTHX_2);
#define PERL_ARGS_ASSERT_FIND_ARRAY_SUBSCRIPT \
assert(val)
-STATIC SV* S_find_uninit_var(pTHX_ OP* obase, SV* uninit_sv, bool top);
+STATIC SV* S_find_uninit_var(pTHX_ const OP *const obase, const SV *const uninit_sv, bool top);
#endif
#ifdef PERL_NEED_MY_HTOLE16
PERL_CALLCONV void Perl_sys_term(void);
PERL_CALLCONV const char * Perl_fetch_cop_label(pTHX_ struct refcounted_he *const chain, STRLEN *len, U32 *flags);
+PERL_CALLCONV struct refcounted_he * Perl_store_cop_label(pTHX_ struct refcounted_he *const chain, const char *label)
+ __attribute__nonnull__(pTHX_2);
+#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
/*