From: Nicholas Clark Date: Tue, 12 Feb 2008 11:52:30 +0000 (+0000) Subject: In Perl_load_module_nocontext(), ver can actually be NULL. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3d4dd4c7b4cdb5c308fe0b83e0f6354a2eb9db12;p=p5sagit%2Fp5-mst-13.2.git In Perl_load_module_nocontext(), ver can actually be NULL. In Perl_hv_copy_hints_hv(), ohv can actually be NULL. In Perl_sortsv(), Perl_sortsv_flags() and S_qsortsvu(), array can be NULL (if the number of elements to sort is <= 1). In Perl_save_nogv(), gv can not be NULL. In Perl_sv_cmp() and Perl_sv_cmp_locale(), both SVs can be NULL. In Perl_ptr_table_fetch(), the sv can be NULL. In PerlIO_set_ptrcnt(), ptr can be NULL. p4raw-id: //depot/perl@33287 --- diff --git a/embed.fnc b/embed.fnc index 3c1caab..e47ecc1 100644 --- a/embed.fnc +++ b/embed.fnc @@ -143,7 +143,7 @@ Afnrp |void |croak_nocontext|NN const char* pat|... Afnp |OP* |die_nocontext |NN const char* pat|... Afnp |void |deb_nocontext |NN const char* pat|... Afnp |char* |form_nocontext |NN const char* pat|... -Anp |void |load_module_nocontext|U32 flags|NN SV* name|NN SV* ver|... +Anp |void |load_module_nocontext|U32 flags|NN SV* name|NULLOK SV* ver|... Afnp |SV* |mess_nocontext |NN const char* pat|... Afnp |void |warn_nocontext |NN const char* pat|... Afnp |void |warner_nocontext|U32 err|NN const char* pat|... @@ -299,7 +299,7 @@ Apd |HV* |gv_stashpv |NN const char* name|I32 flags Apd |HV* |gv_stashpvn |NN const char* name|U32 namelen|I32 flags Apd |HV* |gv_stashsv |NN SV* sv|I32 flags Apd |void |hv_clear |NULLOK HV* tb -poM |HV * |hv_copy_hints_hv|NN HV *const ohv +poM |HV * |hv_copy_hints_hv|NULLOK HV *const ohv Ap |void |hv_delayfree_ent|NN HV* hv|NULLOK HE* entry Abmd |SV* |hv_delete |NULLOK HV* tb|NN const char* key|I32 klen \ |I32 flags @@ -486,8 +486,8 @@ p |char* |mem_collxfrm |NN const char* s|STRLEN len|NN STRLEN* xlen Afp |SV* |mess |NN const char* pat|... Ap |SV* |vmess |NN const char* pat|NULLOK va_list* args EXp |void |qerror |NN SV* err -Apd |void |sortsv |NN SV** array|size_t num_elts|NN SVCOMPARE_t cmp -Apd |void |sortsv_flags |NN SV** array|size_t num_elts|NN SVCOMPARE_t cmp|U32 flags +Apd |void |sortsv |NULLOK SV** array|size_t num_elts|NN SVCOMPARE_t cmp +Apd |void |sortsv_flags |NULLOK SV** array|size_t num_elts|NN SVCOMPARE_t cmp|U32 flags Apd |int |mg_clear |NN SV* sv Apd |int |mg_copy |NN SV* sv|NN SV* nsv|NULLOK const char* key|I32 klen pd |void |mg_localize |NN SV* sv|NN SV* nsv @@ -769,7 +769,7 @@ Ap |void |save_iv |NN IV* iv Ap |void |save_list |NN SV** sarg|I32 maxsarg Ap |void |save_long |NN long* longp Ap |void |save_mortalizesv|NN SV* sv -Ap |void |save_nogv |NULLOK GV* gv +Ap |void |save_nogv |NN GV* gv p |void |save_op Ap |SV* |save_scalar |NN GV* gv Ap |void |save_pptr |NN char** pptr @@ -843,8 +843,8 @@ Apd |void |sv_chop |NN SV* sv|NULLOK const char* ptr pd |I32 |sv_clean_all pd |void |sv_clean_objs Apd |void |sv_clear |NN SV* sv -Apd |I32 |sv_cmp |NN SV* sv1|NN SV* sv2 -Apd |I32 |sv_cmp_locale |NN SV* sv1|NN SV* sv2 +Apd |I32 |sv_cmp |NULLOK SV* sv1|NULLOK SV* sv2 +Apd |I32 |sv_cmp_locale |NULLOK SV* sv1|NULLOK SV* sv2 #if defined(USE_LOCALE_COLLATE) Apd |char* |sv_collxfrm |NN SV* sv|NN STRLEN* nxp #endif @@ -1096,7 +1096,7 @@ Ap |void |rvpv_dup |NN SV* dstr|NN const SV *sstr|NN CLONE_PARAMS* param Ap |yy_parser*|parser_dup |NULLOK const yy_parser *proto|NN CLONE_PARAMS* param #endif Apa |PTR_TBL_t*|ptr_table_new -ApR |void* |ptr_table_fetch|NN PTR_TBL_t *tbl|NN const void *sv +ApR |void* |ptr_table_fetch|NN PTR_TBL_t *tbl|NULLOK const void *sv Ap |void |ptr_table_store|NN PTR_TBL_t *tbl|NULLOK const void *oldsv|NN void *newsv Ap |void |ptr_table_split|NN PTR_TBL_t *tbl Ap |void |ptr_table_clear|NULLOK PTR_TBL_t *tbl @@ -1367,7 +1367,7 @@ s |I32 |amagic_cmp_locale|NN SV *a|NN SV *b s |I32 |sortcv |NN SV *a|NN SV *b s |I32 |sortcv_xsub |NN SV *a|NN SV *b s |I32 |sortcv_stacked |NN SV *a|NN SV *b -s |void |qsortsvu |NN SV** array|size_t num_elts|NN SVCOMPARE_t compare +s |void |qsortsvu |NULLOK SV** array|size_t num_elts|NN SVCOMPARE_t compare #endif #if defined(PERL_IN_PP_SYS_C) || defined(PERL_DECL_PROT) @@ -1644,7 +1644,8 @@ Ap |int |PerlIO_error |NULLOK PerlIO *f Ap |int |PerlIO_flush |NULLOK PerlIO *f Ap |void |PerlIO_clearerr |NULLOK PerlIO *f Ap |void |PerlIO_set_cnt |NULLOK PerlIO *f|int cnt -Ap |void |PerlIO_set_ptrcnt |NULLOK PerlIO *f|NN STDCHAR *ptr|int cnt +Ap |void |PerlIO_set_ptrcnt |NULLOK PerlIO *f|NULLOK STDCHAR *ptr \ + |int cnt Ap |void |PerlIO_setlinebuf |NULLOK PerlIO *f Ap |SSize_t|PerlIO_read |NULLOK PerlIO *f|NN void *buf|Size_t count Ap |SSize_t|PerlIO_write |NULLOK PerlIO *f|NN const void *buf|Size_t count diff --git a/proto.h b/proto.h index 2e71be8..d7caaf1 100644 --- a/proto.h +++ b/proto.h @@ -267,8 +267,7 @@ PERL_CALLCONV char* Perl_form_nocontext(const char* pat, ...) __attribute__nonnull__(1); PERL_CALLCONV void Perl_load_module_nocontext(U32 flags, SV* name, SV* ver, ...) - __attribute__nonnull__(2) - __attribute__nonnull__(3); + __attribute__nonnull__(2); PERL_CALLCONV SV* Perl_mess_nocontext(const char* pat, ...) __attribute__format__(__printf__,1,2) @@ -687,9 +686,7 @@ PERL_CALLCONV HV* Perl_gv_stashsv(pTHX_ SV* sv, I32 flags) __attribute__nonnull__(pTHX_1); PERL_CALLCONV void Perl_hv_clear(pTHX_ HV* tb); -PERL_CALLCONV HV * Perl_hv_copy_hints_hv(pTHX_ HV *const ohv) - __attribute__nonnull__(pTHX_1); - +PERL_CALLCONV HV * Perl_hv_copy_hints_hv(pTHX_ HV *const ohv); PERL_CALLCONV void Perl_hv_delayfree_ent(pTHX_ HV* hv, HE* entry) __attribute__nonnull__(pTHX_1); @@ -1300,11 +1297,9 @@ PERL_CALLCONV void Perl_qerror(pTHX_ SV* err) __attribute__nonnull__(pTHX_1); PERL_CALLCONV void Perl_sortsv(pTHX_ SV** array, size_t num_elts, SVCOMPARE_t cmp) - __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_3); PERL_CALLCONV void Perl_sortsv_flags(pTHX_ SV** array, size_t num_elts, SVCOMPARE_t cmp, U32 flags) - __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_3); PERL_CALLCONV int Perl_mg_clear(pTHX_ SV* sv) @@ -2079,7 +2074,9 @@ PERL_CALLCONV void Perl_save_long(pTHX_ long* longp) PERL_CALLCONV void Perl_save_mortalizesv(pTHX_ SV* sv) __attribute__nonnull__(pTHX_1); -PERL_CALLCONV void Perl_save_nogv(pTHX_ GV* gv); +PERL_CALLCONV void Perl_save_nogv(pTHX_ GV* gv) + __attribute__nonnull__(pTHX_1); + PERL_CALLCONV void Perl_save_op(pTHX); PERL_CALLCONV SV* Perl_save_scalar(pTHX_ GV* gv) __attribute__nonnull__(pTHX_1); @@ -2248,14 +2245,8 @@ PERL_CALLCONV void Perl_sv_clean_objs(pTHX); PERL_CALLCONV void Perl_sv_clear(pTHX_ SV* sv) __attribute__nonnull__(pTHX_1); -PERL_CALLCONV I32 Perl_sv_cmp(pTHX_ SV* sv1, SV* sv2) - __attribute__nonnull__(pTHX_1) - __attribute__nonnull__(pTHX_2); - -PERL_CALLCONV I32 Perl_sv_cmp_locale(pTHX_ SV* sv1, SV* sv2) - __attribute__nonnull__(pTHX_1) - __attribute__nonnull__(pTHX_2); - +PERL_CALLCONV I32 Perl_sv_cmp(pTHX_ SV* sv1, SV* sv2); +PERL_CALLCONV I32 Perl_sv_cmp_locale(pTHX_ SV* sv1, SV* sv2); #if defined(USE_LOCALE_COLLATE) PERL_CALLCONV char* Perl_sv_collxfrm(pTHX_ SV* sv, STRLEN* nxp) __attribute__nonnull__(pTHX_1) @@ -2916,8 +2907,7 @@ PERL_CALLCONV PTR_TBL_t* Perl_ptr_table_new(pTHX) PERL_CALLCONV void* Perl_ptr_table_fetch(pTHX_ PTR_TBL_t *tbl, const void *sv) __attribute__warn_unused_result__ - __attribute__nonnull__(pTHX_1) - __attribute__nonnull__(pTHX_2); + __attribute__nonnull__(pTHX_1); PERL_CALLCONV void Perl_ptr_table_store(pTHX_ PTR_TBL_t *tbl, const void *oldsv, void *newsv) __attribute__nonnull__(pTHX_1) @@ -3618,7 +3608,6 @@ STATIC I32 S_sortcv_stacked(pTHX_ SV *a, SV *b) __attribute__nonnull__(pTHX_2); STATIC void S_qsortsvu(pTHX_ SV** array, size_t num_elts, SVCOMPARE_t compare) - __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_3); #endif @@ -4245,9 +4234,7 @@ PERL_CALLCONV int Perl_PerlIO_error(pTHX_ PerlIO *f); PERL_CALLCONV int Perl_PerlIO_flush(pTHX_ PerlIO *f); PERL_CALLCONV void Perl_PerlIO_clearerr(pTHX_ PerlIO *f); PERL_CALLCONV void Perl_PerlIO_set_cnt(pTHX_ PerlIO *f, int cnt); -PERL_CALLCONV void Perl_PerlIO_set_ptrcnt(pTHX_ PerlIO *f, STDCHAR *ptr, int cnt) - __attribute__nonnull__(pTHX_2); - +PERL_CALLCONV void Perl_PerlIO_set_ptrcnt(pTHX_ PerlIO *f, STDCHAR *ptr, int cnt); PERL_CALLCONV void Perl_PerlIO_setlinebuf(pTHX_ PerlIO *f); PERL_CALLCONV SSize_t Perl_PerlIO_read(pTHX_ PerlIO *f, void *buf, Size_t count) __attribute__nonnull__(pTHX_2);