diff options
author | Andy Lester <andy@petdance.com> | 2005-06-02 07:19:43 -0500 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2005-06-03 08:31:26 +0000 |
commit | b464bac0b70c4876af1296864220315edde8461d (patch) | |
tree | 9d2088559b19bbf0fbf64591f1dcd7df4961be5b /proto.h | |
parent | 2d706fb2bbfd21eac5cd2efc341a42f1caed2490 (diff) | |
download | perl-b464bac0b70c4876af1296864220315edde8461d.tar.gz |
Random consting
Message-ID: <20050602171943.GA16553@petdance.com>
p4raw-id: //depot/perl@24689
Diffstat (limited to 'proto.h')
-rw-r--r-- | proto.h | 93 |
1 files changed, 72 insertions, 21 deletions
@@ -57,7 +57,9 @@ PERL_CALLCONV Malloc_t Perl_realloc(Malloc_t where, MEM_SIZE nbytes) PERL_CALLCONV Free_t Perl_mfree(Malloc_t where); #if defined(MYMALLOC) -PERL_CALLCONV MEM_SIZE Perl_malloced_size(void *p); +PERL_CALLCONV MEM_SIZE Perl_malloced_size(void *p) + __attribute__warn_unused_result__; + #endif PERL_CALLCONV void* Perl_get_context(void); @@ -453,12 +455,18 @@ PERL_CALLCONV void Perl_init_stacks(pTHX); PERL_CALLCONV void Perl_init_tm(pTHX_ struct tm *ptm); PERL_CALLCONV U32 Perl_intro_my(pTHX); PERL_CALLCONV char* Perl_instr(pTHX_ const char* big, const char* little) + __attribute__warn_unused_result__ __attribute__pure__ __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); -PERL_CALLCONV bool Perl_io_close(pTHX_ IO* io, bool not_implicit); -PERL_CALLCONV OP* Perl_invert(pTHX_ OP* cmd); +PERL_CALLCONV bool Perl_io_close(pTHX_ IO* io, bool not_implicit) + __attribute__warn_unused_result__ + __attribute__nonnull__(pTHX_1); + +PERL_CALLCONV OP* Perl_invert(pTHX_ OP* cmd) + __attribute__warn_unused_result__; + PERL_CALLCONV bool Perl_is_gv_magical(pTHX_ const char *name, STRLEN len, U32 flags) __attribute__warn_unused_result__; @@ -1497,8 +1505,12 @@ PERL_CALLCONV SV* Perl_sv_newmortal(pTHX) PERL_CALLCONV SV* Perl_sv_newref(pTHX_ SV* sv); PERL_CALLCONV char* Perl_sv_peek(pTHX_ SV* sv); -PERL_CALLCONV void Perl_sv_pos_u2b(pTHX_ SV* sv, I32* offsetp, I32* lenp); -PERL_CALLCONV void Perl_sv_pos_b2u(pTHX_ SV* sv, I32* offsetp); +PERL_CALLCONV void Perl_sv_pos_u2b(pTHX_ SV* sv, I32* offsetp, I32* lenp) + __attribute__nonnull__(pTHX_2); + +PERL_CALLCONV void Perl_sv_pos_b2u(pTHX_ SV* sv, I32* offsetp) + __attribute__nonnull__(pTHX_2); + /* PERL_CALLCONV char* sv_pvn_force(pTHX_ SV* sv, STRLEN* lp); */ PERL_CALLCONV char* Perl_sv_pvutf8n_force(pTHX_ SV* sv, STRLEN* lp); PERL_CALLCONV char* Perl_sv_pvbyten_force(pTHX_ SV* sv, STRLEN* lp); @@ -1852,9 +1864,7 @@ STATIC void S_hv_magic_check(pTHX_ HV *hv, bool *needs_copy, bool *needs_store) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); -STATIC void S_unshare_hek_or_pvn(pTHX_ HEK* hek, const char* sv, I32 len, U32 hash) - __attribute__nonnull__(pTHX_2); - +STATIC void S_unshare_hek_or_pvn(pTHX_ HEK* hek, const char* str, I32 len, U32 hash); STATIC HE* S_share_hek_flags(pTHX_ const char* sv, I32 len, U32 hash, int flags) __attribute__warn_unused_result__; @@ -1863,6 +1873,10 @@ STATIC void S_hv_notallowed(pTHX_ int flags, const char *key, I32 klen, const ch __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_4); +STATIC struct xpvhv_aux* S_hv_auxinit(pTHX_ HV *hv) + __attribute__malloc__ + __attribute__warn_unused_result__; + #endif #if defined(PERL_IN_MG_C) || defined(PERL_DECL_PROT) @@ -2198,10 +2212,21 @@ STATIC SV* S_method_common(pTHX_ SV* meth, U32* hashp); #endif #if defined(PERL_IN_PP_SYS_C) || defined(PERL_DECL_PROT) -STATIC OP* S_doform(pTHX_ CV *cv, GV *gv, OP *retop); -STATIC int S_emulate_eaccess(pTHX_ const char* path, Mode_t mode); +STATIC OP* S_doform(pTHX_ CV *cv, GV *gv, OP *retop) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2) + __attribute__nonnull__(pTHX_3); + +STATIC int S_emulate_eaccess(pTHX_ const char* path, Mode_t mode) + __attribute__noreturn__ + __attribute__nonnull__(pTHX_1); + # if !defined(HAS_MKDIR) || !defined(HAS_RMDIR) -STATIC int S_dooneliner(pTHX_ char *cmd, char *filename); +STATIC int S_dooneliner(pTHX_ const char *cmd, const char *filename) + __attribute__warn_unused_result__ + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); + # endif #endif @@ -2565,17 +2590,43 @@ STATIC SV* S_hv_delete_common(pTHX_ HV* tb, SV* key_sv, const char* key, STRLEN STATIC HE* S_hv_fetch_common(pTHX_ HV* tb, SV* key_sv, const char* key, STRLEN klen, int flags, int action, SV* val, U32 hash); #endif -PERL_CALLCONV void Perl_hv_clear_placeholders(pTHX_ HV* hb); +PERL_CALLCONV SV* Perl_hv_scalar(pTHX_ HV* hv) + __attribute__warn_unused_result__ + __attribute__nonnull__(pTHX_1); + +PERL_CALLCONV I32* Perl_hv_riter_p(pTHX_ HV* hv) + __attribute__warn_unused_result__ + __attribute__nonnull__(pTHX_1); + +PERL_CALLCONV HE** Perl_hv_eiter_p(pTHX_ HV* hv) + __attribute__warn_unused_result__ + __attribute__nonnull__(pTHX_1); + +PERL_CALLCONV void Perl_hv_riter_set(pTHX_ HV* hv, I32 riter) + __attribute__nonnull__(pTHX_1); + +PERL_CALLCONV void Perl_hv_eiter_set(pTHX_ HV* hv, HE* eiter) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); + +PERL_CALLCONV void Perl_hv_name_set(pTHX_ HV* hv, const char *name, I32 len, int flags) + __attribute__nonnull__(pTHX_1); + +PERL_CALLCONV void Perl_hv_clear_placeholders(pTHX_ HV* hb) + __attribute__nonnull__(pTHX_1); + +PERL_CALLCONV I32* Perl_hv_placeholders_p(pTHX_ HV* hv) + __attribute__warn_unused_result__ + __attribute__nonnull__(pTHX_1); + +PERL_CALLCONV I32 Perl_hv_placeholders_get(pTHX_ HV* hv) + __attribute__warn_unused_result__ + __attribute__nonnull__(pTHX_1); + +PERL_CALLCONV void Perl_hv_placeholders_set(pTHX_ HV* hv, I32 ph) + __attribute__warn_unused_result__ + __attribute__nonnull__(pTHX_1); -PERL_CALLCONV SV* Perl_hv_scalar(pTHX_ HV* hv); -PERL_CALLCONV I32* Perl_hv_riter_p(pTHX_ HV* hv); -PERL_CALLCONV HE** Perl_hv_eiter_p(pTHX_ HV* hv); -PERL_CALLCONV void Perl_hv_riter_set(pTHX_ HV* hv, I32 riter); -PERL_CALLCONV void Perl_hv_eiter_set(pTHX_ HV* hv, HE* eiter); -PERL_CALLCONV void Perl_hv_name_set(pTHX_ HV* hv, const char *, I32 len, int flags); -PERL_CALLCONV I32* Perl_hv_placeholders_p(pTHX_ HV* hv); -PERL_CALLCONV I32 Perl_hv_placeholders_get(pTHX_ HV* hv); -PERL_CALLCONV void Perl_hv_placeholders_set(pTHX_ HV* hv, I32 ph); PERL_CALLCONV SV* Perl_magic_scalarpack(pTHX_ HV* hv, MAGIC* mg); #ifdef PERL_IN_SV_C |