This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Implement grok_atou as safe/strict atoi replacement.
[perl5.git] / proto.h
diff --git a/proto.h b/proto.h
index 7d3e9e7..1eccc46 100644 (file)
--- a/proto.h
+++ b/proto.h
@@ -1289,6 +1289,11 @@ PERL_CALLCONV int        Perl_getcwd_sv(pTHX_ SV* sv)
 
 PERL_CALLCONV void     Perl_gp_free(pTHX_ GV* gv);
 PERL_CALLCONV GP*      Perl_gp_ref(pTHX_ GP* gp);
+PERL_CALLCONV Size_t   Perl_grok_atou(const char* pv, const char** endptr)
+                       __attribute__nonnull__(1);
+#define PERL_ARGS_ASSERT_GROK_ATOU     \
+       assert(pv)
+
 PERL_CALLCONV UV       Perl_grok_bin(pTHX_ const char* start, STRLEN* len_p, I32* flags, NV *result)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2)
@@ -1308,6 +1313,11 @@ PERL_CALLCONV int        Perl_grok_number(pTHX_ const char *pv, STRLEN len, UV *valuep)
 #define PERL_ARGS_ASSERT_GROK_NUMBER   \
        assert(pv)
 
+PERL_CALLCONV int      Perl_grok_number_flags(pTHX_ const char *pv, STRLEN len, UV *valuep, U32 flags)
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT_GROK_NUMBER_FLAGS     \
+       assert(pv)
+
 PERL_CALLCONV bool     Perl_grok_numeric_radix(pTHX_ const char **sp, const char *send)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1)
@@ -3116,10 +3126,20 @@ PERL_CALLCONV void      Perl_op_null(pTHX_ OP* o)
 #define PERL_ARGS_ASSERT_OP_NULL       \
        assert(o)
 
+PERL_CALLCONV OP*      Perl_op_parent(OP *o)
+                       __attribute__nonnull__(1);
+#define PERL_ARGS_ASSERT_OP_PARENT     \
+       assert(o)
+
 PERL_CALLCONV OP*      Perl_op_prepend_elem(pTHX_ I32 optype, OP* first, OP* last);
 PERL_CALLCONV void     Perl_op_refcnt_lock(pTHX);
 PERL_CALLCONV void     Perl_op_refcnt_unlock(pTHX);
 PERL_CALLCONV OP*      Perl_op_scope(pTHX_ OP* o);
+PERL_CALLCONV OP*      Perl_op_sibling_splice(OP *parent, OP *start, int del_count, OP* insert)
+                       __attribute__nonnull__(1);
+#define PERL_ARGS_ASSERT_OP_SIBLING_SPLICE     \
+       assert(parent)
+
 PERL_CALLCONV OP*      Perl_op_unscope(pTHX_ OP* o);
 PERL_CALLCONV void     Perl_pack_cat(pTHX_ SV *cat, const char *pat, const char *patend, SV **beglist, SV **endlist, SV ***next_in_list, U32 flags)
                        __attribute__nonnull__(pTHX_1)
@@ -6118,7 +6138,7 @@ STATIC OP*        S_fold_constants(pTHX_ OP *o)
 #define PERL_ARGS_ASSERT_FOLD_CONSTANTS        \
        assert(o)
 
-STATIC OP*     S_force_list(pTHX_ OP* arg);
+STATIC OP*     S_force_list(pTHX_ OP* arg, bool nullit);
 STATIC void    S_forget_pmop(pTHX_ PMOP *const o)
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_FORGET_PMOP   \
@@ -7378,6 +7398,11 @@ STATIC void      S_not_a_number(pTHX_ SV *const sv)
 #define PERL_ARGS_ASSERT_NOT_A_NUMBER  \
        assert(sv)
 
+STATIC void    S_not_incrementable(pTHX_ SV *const sv)
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT_NOT_INCREMENTABLE     \
+       assert(sv)
+
 STATIC PTR_TBL_ENT_t * S_ptr_table_find(PTR_TBL_t *const tbl, const void *const sv)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(1);
@@ -7394,6 +7419,12 @@ STATIC void      S_sv_add_arena(pTHX_ char *const ptr, const U32 size, const U32 flag
 #define PERL_ARGS_ASSERT_SV_ADD_ARENA  \
        assert(ptr)
 
+STATIC const char *    S_sv_display(pTHX_ SV *const sv, char *tmpbuf, STRLEN tmpbuf_size)
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_2);
+#define PERL_ARGS_ASSERT_SV_DISPLAY    \
+       assert(sv); assert(tmpbuf)
+
 STATIC STRLEN  S_sv_pos_b2u_midway(pTHX_ const U8 *const s, const U8 *const target, const U8 *end, STRLEN endu)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2)