This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perlfunc: clarification
[perl5.git] / proto.h
diff --git a/proto.h b/proto.h
index b456442..2ecd0ec 100644 (file)
--- a/proto.h
+++ b/proto.h
@@ -312,12 +312,6 @@ PERL_CALLCONV OP * Perl_ck_bitop(pTHX_ OP *o)
 #define PERL_ARGS_ASSERT_CK_BITOP      \
        assert(o)
 
-PERL_CALLCONV OP *     Perl_ck_chdir(pTHX_ OP *o)
-                       __attribute__warn_unused_result__
-                       __attribute__nonnull__(pTHX_1);
-#define PERL_ARGS_ASSERT_CK_CHDIR      \
-       assert(o)
-
 PERL_CALLCONV OP *     Perl_ck_cmp(pTHX_ OP *o)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1);
@@ -635,20 +629,20 @@ PERL_CALLCONV OP *        Perl_coresub_op(pTHX_ SV *coreargssv, const int code, const i
        assert(coreargssv)
 
 PERL_CALLCONV PERL_CONTEXT*    Perl_create_eval_scope(pTHX_ U32 flags);
-PERL_CALLCONV void     Perl_croak(pTHX_ const char* pat, ...)
+PERL_CALLCONV_NO_RET void      Perl_croak(pTHX_ const char* pat, ...)
                        __attribute__noreturn__
                        __attribute__format__null_ok__(__printf__,pTHX_1,pTHX_2);
 
-PERL_CALLCONV void     Perl_croak_no_modify(pTHX)
+PERL_CALLCONV_NO_RET void      Perl_croak_no_modify(pTHX)
                        __attribute__noreturn__;
 
-PERL_CALLCONV void     Perl_croak_sv(pTHX_ SV *baseex)
+PERL_CALLCONV_NO_RET void      Perl_croak_sv(pTHX_ SV *baseex)
                        __attribute__noreturn__
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_CROAK_SV      \
        assert(baseex)
 
-PERL_CALLCONV void     Perl_croak_xs_usage(pTHX_ const CV *const cv, const char *const params)
+PERL_CALLCONV_NO_RET void      Perl_croak_xs_usage(pTHX_ const CV *const cv, const char *const params)
                        __attribute__noreturn__
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2);
@@ -693,6 +687,11 @@ PERL_CALLCONV CV*  Perl_cv_clone(pTHX_ CV* proto)
 PERL_CALLCONV SV*      Perl_cv_const_sv(pTHX_ const CV *const cv)
                        __attribute__warn_unused_result__;
 
+PERL_CALLCONV void     Perl_cv_forget_slab(pTHX_ CV *cv)
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT_CV_FORGET_SLAB        \
+       assert(cv)
+
 PERL_CALLCONV void     Perl_cv_get_call_checker(pTHX_ CV *cv, Perl_call_checker *ckfun_p, SV **ckobj_p)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2)
@@ -764,7 +763,7 @@ PERL_CALLCONV OP*   Perl_die_sv(pTHX_ SV *baseex)
 #define PERL_ARGS_ASSERT_DIE_SV        \
        assert(baseex)
 
-PERL_CALLCONV void     Perl_die_unwind(pTHX_ SV* msv)
+PERL_CALLCONV_NO_RET void      Perl_die_unwind(pTHX_ SV* msv)
                        __attribute__noreturn__
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_DIE_UNWIND    \
@@ -1614,6 +1613,7 @@ PERL_CALLCONV void        Perl_init_argv_symbols(pTHX_ int argc, char **argv)
 #define PERL_ARGS_ASSERT_INIT_ARGV_SYMBOLS     \
        assert(argv)
 
+PERL_CALLCONV void     Perl_init_constants(pTHX);
 PERL_CALLCONV void     Perl_init_dbargs(pTHX);
 PERL_CALLCONV void     Perl_init_debugger(pTHX);
 PERL_CALLCONV int      Perl_init_i18nl10n(pTHX_ int printwarn);
@@ -2219,7 +2219,7 @@ PERL_CALLCONV int Perl_magic_regdatum_get(pTHX_ SV* sv, MAGIC* mg)
 #define PERL_ARGS_ASSERT_MAGIC_REGDATUM_GET    \
        assert(sv); assert(mg)
 
-PERL_CALLCONV int      Perl_magic_regdatum_set(pTHX_ SV* sv, MAGIC* mg)
+PERL_CALLCONV_NO_RET int       Perl_magic_regdatum_set(pTHX_ SV* sv, MAGIC* mg)
                        __attribute__noreturn__
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2);
@@ -2345,12 +2345,6 @@ PERL_CALLCONV int        Perl_magic_setvec(pTHX_ SV* sv, MAGIC* mg)
 #define PERL_ARGS_ASSERT_MAGIC_SETVEC  \
        assert(sv); assert(mg)
 
-PERL_CALLCONV int      Perl_magic_setvstring(pTHX_ SV* sv, MAGIC* mg)
-                       __attribute__nonnull__(pTHX_1)
-                       __attribute__nonnull__(pTHX_2);
-#define PERL_ARGS_ASSERT_MAGIC_SETVSTRING      \
-       assert(sv); assert(mg)
-
 PERL_CALLCONV U32      Perl_magic_sizepack(pTHX_ SV* sv, MAGIC* mg)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2);
@@ -2522,10 +2516,10 @@ PERL_CALLCONV OP *      Perl_my_attrs(pTHX_ OP *o, OP *attrs)
 
 PERL_CALLCONV void     Perl_my_clearenv(pTHX);
 PERL_CALLCONV int      Perl_my_dirfd(pTHX_ DIR* dir);
-PERL_CALLCONV void     Perl_my_exit(pTHX_ U32 status)
+PERL_CALLCONV_NO_RET void      Perl_my_exit(pTHX_ U32 status)
                        __attribute__noreturn__;
 
-PERL_CALLCONV void     Perl_my_failure_exit(pTHX)
+PERL_CALLCONV_NO_RET void      Perl_my_failure_exit(pTHX)
                        __attribute__noreturn__;
 
 PERL_CALLCONV I32      Perl_my_fflush_all(pTHX);
@@ -3312,11 +3306,6 @@ PERL_CALLCONV void       Perl_regdump(pTHX_ const regexp* r)
 #define PERL_ARGS_ASSERT_REGDUMP       \
        assert(r)
 
-PERL_CALLCONV void     Perl_regdump(pTHX_ const regexp* r)
-                       __attribute__nonnull__(pTHX_1);
-#define PERL_ARGS_ASSERT_REGDUMP       \
-       assert(r)
-
 PERL_CALLCONV I32      Perl_regexec_flags(pTHX_ REGEXP *const rx, char *stringarg, char *strend, char *strbeg, I32 minend, SV *sv, void *data, U32 flags)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2)
@@ -3880,12 +3869,22 @@ PERL_CALLCONV I32       Perl_sv_cmp(pTHX_ SV *const sv1, SV *const sv2);
 PERL_CALLCONV I32      Perl_sv_cmp_flags(pTHX_ SV *const sv1, SV *const sv2, const U32 flags);
 PERL_CALLCONV I32      Perl_sv_cmp_locale(pTHX_ SV *const sv1, SV *const sv2);
 PERL_CALLCONV I32      Perl_sv_cmp_locale_flags(pTHX_ SV *const sv1, SV *const sv2, const U32 flags);
-PERL_CALLCONV void     Perl_sv_copypv(pTHX_ SV *const dsv, SV *const ssv)
+/* PERL_CALLCONV void  Perl_sv_copypv(pTHX_ SV *const dsv, SV *const ssv)
                        __attribute__nonnull__(pTHX_1)
-                       __attribute__nonnull__(pTHX_2);
+                       __attribute__nonnull__(pTHX_2); */
 #define PERL_ARGS_ASSERT_SV_COPYPV     \
        assert(dsv); assert(ssv)
 
+PERL_CALLCONV void     Perl_sv_copypv_flags(pTHX_ SV *const dsv, SV *const ssv, const I32 flags)
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_2);
+#define PERL_ARGS_ASSERT_SV_COPYPV_FLAGS       \
+       assert(dsv); assert(ssv)
+
+/* PERL_CALLCONV void  Perl_sv_copypv_nomg(pTHX_ SV *const dsv, SV *const ssv)
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_2); */
+
 PERL_CALLCONV void     Perl_sv_dec(pTHX_ SV *const sv);
 PERL_CALLCONV void     Perl_sv_dec_nomg(pTHX_ SV *const sv);
 PERL_CALLCONV void     Perl_sv_del_backref(pTHX_ SV *const tsv, SV *const sv)
@@ -3981,11 +3980,6 @@ PERL_CALLCONV char*      Perl_sv_gets(pTHX_ SV *const sv, PerlIO *const fp, I32 appen
 #define PERL_ARGS_ASSERT_SV_GETS       \
        assert(sv); assert(fp)
 
-PERL_CALLCONV bool     Perl_sv_gmagical_2iv_please(pTHX_ SV *sv)
-                       __attribute__nonnull__(pTHX_1);
-#define PERL_ARGS_ASSERT_SV_GMAGICAL_2IV_PLEASE        \
-       assert(sv)
-
 PERL_CALLCONV char*    Perl_sv_grow(pTHX_ SV *const sv, STRLEN newlen)
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_SV_GROW       \
@@ -4393,6 +4387,12 @@ PERL_CALLCONV void       Perl_sv_vcatpvfn(pTHX_ SV *const sv, const char *const pat, c
 #define PERL_ARGS_ASSERT_SV_VCATPVFN   \
        assert(sv); assert(pat)
 
+PERL_CALLCONV void     Perl_sv_vcatpvfn_flags(pTHX_ SV *const sv, const char *const pat, const STRLEN patlen, va_list *const args, SV **const svargs, const I32 svmax, bool *const maybe_tainted, const U32 flags)
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_2);
+#define PERL_ARGS_ASSERT_SV_VCATPVFN_FLAGS     \
+       assert(sv); assert(pat)
+
 PERL_CALLCONV void     Perl_sv_vsetpvf(pTHX_ SV *const sv, const char *const pat, va_list *const args)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2);
@@ -4648,7 +4648,7 @@ PERL_CALLCONV int Perl_vcmp(pTHX_ SV *lhv, SV *rhv)
 #define PERL_ARGS_ASSERT_VCMP  \
        assert(lhv); assert(rhv)
 
-PERL_CALLCONV void     Perl_vcroak(pTHX_ const char* pat, va_list* args)
+PERL_CALLCONV_NO_RET void      Perl_vcroak(pTHX_ const char* pat, va_list* args)
                        __attribute__noreturn__;
 
 PERL_CALLCONV void     Perl_vdeb(pTHX_ const char* pat, va_list* args)
@@ -4855,7 +4855,7 @@ PERL_CALLCONV void*       Perl_my_cxt_init(pTHX_ int *index, size_t size)
 #endif
 #if !(defined(PERL_MAD))
 PERL_CALLCONV void     Perl_newFORM(pTHX_ I32 floor, OP* o, OP* block);
-PERL_CALLCONV void     Perl_newMYSUB(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, OP *block)
+PERL_CALLCONV_NO_RET void      Perl_newMYSUB(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, OP *block)
                        __attribute__noreturn__;
 
 PERL_CALLCONV void     Perl_package(pTHX_ OP* o)
@@ -4999,30 +4999,6 @@ STATIC I32       S_utf16_textfilter(pTHX_ int idx, SV *sv, int maxlen)
 
 #  endif
 #endif
-#if !defined(PL_OP_SLAB_ALLOC)
-PERL_CALLCONV void     Perl_cv_forget_slab(pTHX_ CV *cv)
-                       __attribute__nonnull__(pTHX_1);
-#define PERL_ARGS_ASSERT_CV_FORGET_SLAB        \
-       assert(cv)
-
-#endif
-#if !defined(PL_OP_SLAB_ALLOC) && defined(PERL_CORE)
-PERL_CALLCONV void     Perl_opslab_force_free(pTHX_ OPSLAB *slab)
-                       __attribute__nonnull__(pTHX_1);
-#define PERL_ARGS_ASSERT_OPSLAB_FORCE_FREE     \
-       assert(slab)
-
-PERL_CALLCONV void     Perl_opslab_free(pTHX_ OPSLAB *slab)
-                       __attribute__nonnull__(pTHX_1);
-#define PERL_ARGS_ASSERT_OPSLAB_FREE   \
-       assert(slab)
-
-PERL_CALLCONV void     Perl_opslab_free_nopad(pTHX_ OPSLAB *slab)
-                       __attribute__nonnull__(pTHX_1);
-#define PERL_ARGS_ASSERT_OPSLAB_FREE_NOPAD     \
-       assert(slab)
-
-#endif
 #if !defined(SETUID_SCRIPTS_ARE_SECURE_NOW)
 #  if defined(PERL_IN_PERL_C)
 STATIC void    S_validate_suid(pTHX_ PerlIO *rsfp)
@@ -5283,6 +5259,30 @@ PERL_CALLCONV short      Perl_my_swap(pTHX_ short s)
 #if defined(NO_MATHOMS)
 /* PERL_CALLCONV void  Perl_sv_nounlocking(pTHX_ SV *sv); */
 #endif
+#if defined(PERL_CORE)
+PERL_CALLCONV void     Perl_opslab_force_free(pTHX_ OPSLAB *slab)
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT_OPSLAB_FORCE_FREE     \
+       assert(slab)
+
+PERL_CALLCONV void     Perl_opslab_free(pTHX_ OPSLAB *slab)
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT_OPSLAB_FREE   \
+       assert(slab)
+
+PERL_CALLCONV void     Perl_opslab_free_nopad(pTHX_ OPSLAB *slab)
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT_OPSLAB_FREE_NOPAD     \
+       assert(slab)
+
+#  if defined(PERL_DEBUG_READONLY_OPS)
+PERL_CALLCONV void     Perl_Slab_to_ro(pTHX_ OPSLAB *slab)
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT_SLAB_TO_RO    \
+       assert(slab)
+
+#  endif
+#endif
 #if defined(PERL_CR_FILTER)
 #  if defined(PERL_IN_TOKE_C)
 STATIC I32     S_cr_textfilter(pTHX_ int idx, SV *sv, int maxlen);
@@ -5300,7 +5300,6 @@ PERL_CALLCONV PADOFFSET   Perl_op_refcnt_dec(pTHX_ OP *o)
        assert(o)
 
 PERL_CALLCONV OP *     Perl_op_refcnt_inc(pTHX_ OP *o);
-PERL_CALLCONV void     Perl_pending_Slabs_to_ro(pTHX);
 #  if defined(PERL_IN_OP_C)
 STATIC void    S_Slab_to_rw(pTHX_ void *op)
                        __attribute__nonnull__(pTHX_1);
@@ -5341,7 +5340,7 @@ PERL_CALLCONV void*       Perl_my_cxt_init(pTHX_ const char *my_cxt_key, size_t size)
 #  endif
 #endif
 #if defined(PERL_IMPLICIT_CONTEXT)
-PERL_CALLCONV void     Perl_croak_nocontext(const char* pat, ...)
+PERL_CALLCONV_NO_RET void      Perl_croak_nocontext(const char* pat, ...)
                        __attribute__noreturn__
                        __attribute__format__null_ok__(__printf__,1,2);
 
@@ -6360,6 +6359,12 @@ PERL_STATIC_INLINE UV*   S__invlist_array_init(pTHX_ SV* const invlist, const bool
 #define PERL_ARGS_ASSERT__INVLIST_ARRAY_INIT   \
        assert(invlist)
 
+STATIC bool    S__invlist_contains_cp(pTHX_ SV* const invlist, const UV cp)
+                       __attribute__warn_unused_result__
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT__INVLIST_CONTAINS_CP  \
+       assert(invlist)
+
 STATIC SV*     S__new_invlist_C_array(pTHX_ UV* list)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1);
@@ -6382,6 +6387,12 @@ STATIC U32       S_add_data(struct RExC_state_t *pRExC_state, U32 n, const char *s)
 #define PERL_ARGS_ASSERT_ADD_DATA      \
        assert(pRExC_state); assert(s)
 
+PERL_STATIC_INLINE void        S_alloc_maybe_populate_EXACT(pTHX_ struct RExC_state_t *pRExC_state, regnode *node, STRLEN len, UV code_point)
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_2);
+#define PERL_ARGS_ASSERT_ALLOC_MAYBE_POPULATE_EXACT    \
+       assert(pRExC_state); assert(node)
+
 STATIC void    S_checkposixcc(pTHX_ struct RExC_state_t *pRExC_state)
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_CHECKPOSIXCC  \
@@ -6418,6 +6429,11 @@ STATIC void      S_cl_or(const struct RExC_state_t *pRExC_state, struct regnode_charc
 #define PERL_ARGS_ASSERT_CL_OR \
        assert(pRExC_state); assert(cl); assert(or_with)
 
+PERL_STATIC_INLINE U8  S_compute_EXACTish(pTHX_ struct RExC_state_t *pRExC_state)
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT_COMPUTE_EXACTISH      \
+       assert(pRExC_state)
+
 PERL_STATIC_INLINE UV* S_get_invlist_iter_addr(pTHX_ SV* invlist)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1);
@@ -6459,6 +6475,12 @@ STATIC void      S_invlist_extend(pTHX_ SV* const invlist, const UV len)
 #define PERL_ARGS_ASSERT_INVLIST_EXTEND        \
        assert(invlist)
 
+PERL_STATIC_INLINE UV  S_invlist_highest(pTHX_ SV* const invlist)
+                       __attribute__warn_unused_result__
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT_INVLIST_HIGHEST       \
+       assert(invlist)
+
 PERL_STATIC_INLINE void        S_invlist_iterinit(pTHX_ SV* invlist)
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_INVLIST_ITERINIT      \
@@ -6651,12 +6673,24 @@ PERL_CALLCONV SV*       Perl__core_swash_init(pTHX_ const char* pkg, const char* name,
 #define PERL_ARGS_ASSERT__CORE_SWASH_INIT      \
        assert(pkg); assert(name); assert(listsv)
 
+PERL_CALLCONV SV*      Perl__get_swash_invlist(pTHX_ SV* const swash)
+                       __attribute__warn_unused_result__
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT__GET_SWASH_INVLIST    \
+       assert(swash)
+
 PERL_CALLCONV SV*      Perl__invlist_contents(pTHX_ SV* const invlist)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT__INVLIST_CONTENTS     \
        assert(invlist)
 
+PERL_CALLCONV bool     Perl__is_swash_user_defined(pTHX_ SV* const swash)
+                       __attribute__warn_unused_result__
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT__IS_SWASH_USER_DEFINED        \
+       assert(swash)
+
 #endif
 #if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_UTF8_C)
 PERL_CALLCONV SV*      Perl__add_range_to_invlist(pTHX_ SV* invlist, const UV start, const UV end)
@@ -7310,7 +7344,7 @@ PERL_CALLCONV MADPROP*    Perl_newMADsv(pTHX_ char key, SV* sv)
 #define PERL_ARGS_ASSERT_NEWMADSV      \
        assert(sv)
 
-PERL_CALLCONV OP *     Perl_newMYSUB(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, OP *block)
+PERL_CALLCONV_NO_RET OP *      Perl_newMYSUB(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, OP *block)
                        __attribute__noreturn__;
 
 PERL_CALLCONV TOKEN*   Perl_newTOKEN(pTHX_ I32 optype, YYSTYPE lval, MADPROP* madprop);