This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Mark is_ascii_string() as requiring looking at return value
[perl5.git] / proto.h
diff --git a/proto.h b/proto.h
index 95ad1be..aabb5c5 100644 (file)
--- a/proto.h
+++ b/proto.h
@@ -42,6 +42,9 @@ PERL_CALLCONV void    Perl_Slab_Free(pTHX_ void *op)
 #define PERL_ARGS_ASSERT_SLAB_FREE     \
        assert(op)
 
+PERL_CALLCONV SV*      Perl__get_encoding(pTHX)
+                       __attribute__pure__;
+
 PERL_CALLCONV bool     Perl__is_in_locale_category(pTHX_ const bool compiling, const int category);
 PERL_CALLCONV bool     Perl__is_uni_FOO(pTHX_ const U8 classnum, const UV c)
                        __attribute__warn_unused_result__;
@@ -904,6 +907,16 @@ PERL_CALLCONV char*        Perl_delimcpy(char* to, const char* toend, const char* from,
        assert(to); assert(toend); assert(from); assert(fromend); assert(retlen)
 
 PERL_CALLCONV void     Perl_despatch_signals(pTHX);
+PERL_CALLCONV_NO_RET OP*       Perl_die(pTHX_ const char* pat, ...)
+                       __attribute__noreturn__
+                       __attribute__format__null_ok__(__printf__,pTHX_1,pTHX_2);
+
+PERL_CALLCONV_NO_RET OP*       Perl_die_sv(pTHX_ SV *baseex)
+                       __attribute__noreturn__
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT_DIE_SV        \
+       assert(baseex)
+
 PERL_CALLCONV_NO_RET void      Perl_die_unwind(pTHX_ SV* msv)
                        __attribute__noreturn__
                        __attribute__nonnull__(pTHX_1);
@@ -1856,6 +1869,7 @@ PERL_CALLCONV bool        Perl_isIDFIRST_lazy(pTHX_ const char* p)
        assert(p)
 
 PERL_CALLCONV bool     Perl_is_ascii_string(const U8 *s, STRLEN len)
+                       __attribute__warn_unused_result__
                        __attribute__nonnull__(1);
 #define PERL_ARGS_ASSERT_IS_ASCII_STRING       \
        assert(s)
@@ -3115,6 +3129,12 @@ PERL_CALLCONV CV*        Perl_newXS(pTHX_ const char *name, XSUBADDR_t subaddr, const c
 #define PERL_ARGS_ASSERT_NEWXS \
        assert(subaddr); assert(filename)
 
+PERL_CALLCONV CV *     Perl_newXS_deffile(pTHX_ const char *name, XSUBADDR_t subaddr)
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_2);
+#define PERL_ARGS_ASSERT_NEWXS_DEFFILE \
+       assert(name); assert(subaddr)
+
 PERL_CALLCONV CV *     Perl_newXS_flags(pTHX_ const char *name, XSUBADDR_t subaddr, const char *const filename, const char *const proto, U32 flags)
                        __attribute__nonnull__(pTHX_2)
                        __attribute__nonnull__(pTHX_3);
@@ -3122,10 +3142,9 @@ PERL_CALLCONV CV *       Perl_newXS_flags(pTHX_ const char *name, XSUBADDR_t subaddr,
        assert(subaddr); assert(filename)
 
 PERL_CALLCONV CV *     Perl_newXS_len_flags(pTHX_ const char *name, STRLEN len, XSUBADDR_t subaddr, const char *const filename, const char *const proto, SV **const_svp, U32 flags)
-                       __attribute__nonnull__(pTHX_3)
-                       __attribute__nonnull__(pTHX_4);
+                       __attribute__nonnull__(pTHX_3);
 #define PERL_ARGS_ASSERT_NEWXS_LEN_FLAGS       \
-       assert(subaddr); assert(filename)
+       assert(subaddr)
 
 PERL_CALLCONV void     Perl_new_collate(pTHX_ const char* newcoll);
 PERL_CALLCONV void     Perl_new_ctype(pTHX_ const char* newctype)
@@ -3164,6 +3183,13 @@ PERL_CALLCONV char*      Perl_ninstr(const char* big, const char* bigend, const char*
 #define PERL_ARGS_ASSERT_NINSTR        \
        assert(big); assert(bigend); assert(little); assert(lend)
 
+PERL_CALLCONV_NO_RET void      Perl_noperl_die(const char* pat, ...)
+                       __attribute__noreturn__
+                       __attribute__format__(__printf__,1,2)
+                       __attribute__nonnull__(1);
+#define PERL_ARGS_ASSERT_NOPERL_DIE    \
+       assert(pat)
+
 PERL_CALLCONV int      Perl_nothreadhook(pTHX);
 PERL_CALLCONV OP*      Perl_oopsAV(pTHX_ OP* o)
                        __attribute__warn_unused_result__
@@ -3184,9 +3210,6 @@ PERL_CALLCONV void        Perl_op_clear(pTHX_ OP* o)
 #define PERL_ARGS_ASSERT_OP_CLEAR      \
        assert(o)
 
-PERL_CALLCONV SV*      Perl_op_const_sv(pTHX_ const OP* o, CV* cv)
-                       __attribute__warn_unused_result__;
-
 PERL_CALLCONV OP*      Perl_op_contextualize(pTHX_ OP* o, I32 context)
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_OP_CONTEXTUALIZE      \
@@ -5153,11 +5176,12 @@ PERL_CALLCONV void      Perl_write_to_stderr(pTHX_ SV* msv)
 #define PERL_ARGS_ASSERT_WRITE_TO_STDERR       \
        assert(msv)
 
-PERL_CALLCONV void     Perl_xs_apiversion_bootcheck(SV *module, const char *api_p, STRLEN api_len)
-                       __attribute__nonnull__(1)
-                       __attribute__nonnull__(2);
-#define PERL_ARGS_ASSERT_XS_APIVERSION_BOOTCHECK       \
-       assert(module); assert(api_p)
+PERL_CALLCONV void     Perl_xs_boot_epilog(pTHX_ const U32 ax);
+PERL_CALLCONV I32      Perl_xs_handshake(const U32 key, void * v_my_perl, const char * file, ...)
+                       __attribute__nonnull__(2)
+                       __attribute__nonnull__(3);
+#define PERL_ARGS_ASSERT_XS_HANDSHAKE  \
+       assert(v_my_perl); assert(file)
 
 PERL_CALLCONV void     Perl_xs_version_bootcheck(pTHX_ U32 items, U32 ax, const char *xs_p, STRLEN xs_len)
                        __attribute__nonnull__(pTHX_3);
@@ -5222,16 +5246,6 @@ PERL_CALLCONV void*      Perl_my_cxt_init(pTHX_ int *index, size_t size)
 
 #endif
 #if !(defined(_MSC_VER))
-PERL_CALLCONV_NO_RET OP*       Perl_die(pTHX_ const char* pat, ...)
-                       __attribute__noreturn__
-                       __attribute__format__null_ok__(__printf__,pTHX_1,pTHX_2);
-
-PERL_CALLCONV_NO_RET OP*       Perl_die_sv(pTHX_ SV *baseex)
-                       __attribute__noreturn__
-                       __attribute__nonnull__(pTHX_1);
-#define PERL_ARGS_ASSERT_DIE_SV        \
-       assert(baseex)
-
 PERL_CALLCONV_NO_RET int       Perl_magic_regdatum_set(pTHX_ SV* sv, MAGIC* mg)
                        __attribute__noreturn__
                        __attribute__nonnull__(pTHX_1)
@@ -5239,20 +5253,6 @@ PERL_CALLCONV_NO_RET int Perl_magic_regdatum_set(pTHX_ SV* sv, MAGIC* mg)
 #define PERL_ARGS_ASSERT_MAGIC_REGDATUM_SET    \
        assert(sv); assert(mg)
 
-PERL_CALLCONV_NO_RET char*     Perl_screaminstr(pTHX_ SV *bigstr, SV *littlestr, I32 start_shift, I32 end_shift, I32 *old_posp, I32 last)
-                       __attribute__noreturn__
-                       __attribute__nonnull__(pTHX_1)
-                       __attribute__nonnull__(pTHX_2)
-                       __attribute__nonnull__(pTHX_5);
-#define PERL_ARGS_ASSERT_SCREAMINSTR   \
-       assert(bigstr); assert(littlestr); assert(old_posp)
-
-#  if defined(PERL_IMPLICIT_CONTEXT)
-PERL_CALLCONV_NO_RET OP*       Perl_die_nocontext(const char* pat, ...)
-                       __attribute__noreturn__
-                       __attribute__format__null_ok__(__printf__,1,2);
-
-#  endif
 #endif
 #if !defined(HAS_BZERO) && !defined(HAS_MEMSET)
 PERL_CALLCONV char*    Perl_my_bzero(char* loc, I32 len)
@@ -5430,8 +5430,8 @@ PERL_CALLCONV void        Perl_pad_setsv(pTHX_ PADOFFSET po, SV* sv)
        assert(sv)
 
 PERL_CALLCONV SV*      Perl_pad_sv(pTHX_ PADOFFSET po);
-PERL_CALLCONV void     Perl_set_padlist(pTHX_ CV * cv, PADLIST * padlist)
-                       __attribute__nonnull__(pTHX_1);
+PERL_CALLCONV void     Perl_set_padlist(CV * cv, PADLIST * padlist)
+                       __attribute__nonnull__(1);
 #define PERL_ARGS_ASSERT_SET_PADLIST   \
        assert(cv)
 
@@ -5755,6 +5755,10 @@ PERL_CALLCONV void       Perl_deb_nocontext(const char* pat, ...)
 #define PERL_ARGS_ASSERT_DEB_NOCONTEXT \
        assert(pat)
 
+PERL_CALLCONV_NO_RET OP*       Perl_die_nocontext(const char* pat, ...)
+                       __attribute__noreturn__
+                       __attribute__format__null_ok__(__printf__,1,2);
+
 PERL_CALLCONV char*    Perl_form_nocontext(const char* pat, ...)
                        __attribute__format__(__printf__,1,2)
                        __attribute__nonnull__(1);
@@ -5831,11 +5835,6 @@ PERL_CALLCONV void       Perl_warner_nocontext(U32 err, const char* pat, ...)
 #define PERL_ARGS_ASSERT_WARNER_NOCONTEXT      \
        assert(pat)
 
-#  if defined(_MSC_VER)
-PERL_CALLCONV OP*      Perl_die_nocontext(const char* pat, ...)
-                       __attribute__format__null_ok__(__printf__,1,2);
-
-#  endif
 #endif
 #if defined(PERL_IMPLICIT_SYS)
 PERL_CALLCONV PerlInterpreter* perl_alloc_using(struct IPerlMem *ipM, struct IPerlMem *ipMS, struct IPerlMem *ipMP, struct IPerlEnv *ipE, struct IPerlStdIO *ipStd, struct IPerlLIO *ipLIO, struct IPerlDir *ipD, struct IPerlSock *ipS, struct IPerlProc *ipP)
@@ -6464,7 +6463,7 @@ PERL_STATIC_NO_RET void   S_usage(pTHX)
 
 #endif
 #if defined(PERL_IN_PP_C)
-STATIC void    S_do_chomp(pTHX_ SV *retval, SV *sv, bool chomping)
+STATIC size_t  S_do_chomp(pTHX_ SV *retval, SV *sv, bool chomping)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2);
 #define PERL_ARGS_ASSERT_DO_CHOMP      \
@@ -7835,13 +7834,14 @@ STATIC bool     S_isa_lookup(pTHX_ HV *stash, const char * const name, STRLEN len, U
 
 #endif
 #if defined(PERL_IN_UTF8_C)
-STATIC UV      S_check_locale_boundary_crossing(pTHX_ const U8* const p, const UV result, U8* const ustrp, STRLEN *lenp)
+STATIC UV      S_check_locale_boundary_crossing(pTHX_ const char * const func_name, const U8* const p, const UV result, U8* const ustrp, STRLEN *lenp)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1)
-                       __attribute__nonnull__(pTHX_3)
-                       __attribute__nonnull__(pTHX_4);
+                       __attribute__nonnull__(pTHX_2)
+                       __attribute__nonnull__(pTHX_4)
+                       __attribute__nonnull__(pTHX_5);
 #define PERL_ARGS_ASSERT_CHECK_LOCALE_BOUNDARY_CROSSING        \
-       assert(p); assert(ustrp); assert(lenp)
+       assert(func_name); assert(p); assert(ustrp); assert(lenp)
 
 PERL_STATIC_INLINE bool        S_is_utf8_common(pTHX_ const U8 *const p, SV **swash, const char * const swashname, SV* const invlist)
                        __attribute__warn_unused_result__
@@ -8194,27 +8194,12 @@ PERL_CALLCONV int       Perl_do_spawn_nowait(pTHX_ char* cmd)
 
 #endif
 #if defined(_MSC_VER)
-PERL_CALLCONV OP*      Perl_die(pTHX_ const char* pat, ...)
-                       __attribute__format__null_ok__(__printf__,pTHX_1,pTHX_2);
-
-PERL_CALLCONV OP*      Perl_die_sv(pTHX_ SV *baseex)
-                       __attribute__nonnull__(pTHX_1);
-#define PERL_ARGS_ASSERT_DIE_SV        \
-       assert(baseex)
-
 PERL_CALLCONV int      Perl_magic_regdatum_set(pTHX_ SV* sv, MAGIC* mg)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2);
 #define PERL_ARGS_ASSERT_MAGIC_REGDATUM_SET    \
        assert(sv); assert(mg)
 
-PERL_CALLCONV char*    Perl_screaminstr(pTHX_ SV *bigstr, SV *littlestr, I32 start_shift, I32 end_shift, I32 *old_posp, I32 last)
-                       __attribute__nonnull__(pTHX_1)
-                       __attribute__nonnull__(pTHX_2)
-                       __attribute__nonnull__(pTHX_5);
-#define PERL_ARGS_ASSERT_SCREAMINSTR   \
-       assert(bigstr); assert(littlestr); assert(old_posp)
-
 #endif
 #ifdef PERL_CORE
 #  include "pp_proto.h"