From: Andy Lester Date: Tue, 13 Sep 2005 01:08:36 +0000 (-0500) Subject: The return of the consting X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=bfce84ec9fb7d74c41a80b7823d3e3c5a1e43f7a;p=p5sagit%2Fp5-mst-13.2.git The return of the consting Message-ID: <20050913060835.GA1037@petdance.com> p4raw-id: //depot/perl@25397 --- diff --git a/embed.fnc b/embed.fnc index 9ff584a..a1fbaa7 100644 --- a/embed.fnc +++ b/embed.fnc @@ -305,7 +305,7 @@ pR |bool |ingroup |Gid_t testgid|Uid_t effective p |void |init_argv_symbols|int argc|NN char **argv p |void |init_debugger Ap |void |init_stacks -Ap |void |init_tm |struct tm *ptm +Ap |void |init_tm |NN struct tm *ptm pd |U32 |intro_my ApPR |char* |instr |NN const char* big|NN const char* little pR |bool |io_close |NN IO* io|bool not_implicit @@ -371,7 +371,7 @@ p |OP* |jmaybe |NN OP* arg pP |I32 |keyword |NN const char* d|I32 len Ap |void |leave_scope |I32 base p |void |lex_end -p |void |lex_start |SV* line +p |void |lex_start |NN SV* line Ap |void |op_null |NN OP* o p |void |op_clear |NN OP* o Ap |void |op_refcnt_lock @@ -381,63 +381,63 @@ p |OP* |list |NULLOK OP* o p |OP* |listkids |NULLOK OP* o Apd |void |load_module|U32 flags|NN SV* name|NULLOK SV* ver|... Ap |void |vload_module|U32 flags|NN SV* name|NULLOK SV* ver|NULLOK va_list* args -p |OP* |localize |OP* arg|I32 lexical +p |OP* |localize |NN OP* arg|I32 lexical ApdR |I32 |looks_like_number|NN SV* sv Apd |UV |grok_bin |NN const char* start|NN STRLEN* len_p|NN I32* flags|NV *result Apd |UV |grok_hex |NN const char* start|NN STRLEN* len_p|NN I32* flags|NV *result Apd |int |grok_number |NN const char *pv|STRLEN len|UV *valuep -ApdR |bool |grok_numeric_radix|const char **sp|const char *send -Apd |UV |grok_oct |const char* start|STRLEN* len_p|I32* flags|NV *result -p |int |magic_clearenv |SV* sv|MAGIC* mg -p |int |magic_clear_all_env|SV* sv|MAGIC* mg -p |int |magic_clearpack|SV* sv|MAGIC* mg -p |int |magic_clearsig |SV* sv|MAGIC* mg -p |int |magic_existspack|SV* sv|MAGIC* mg -p |int |magic_freeregexp|SV* sv|MAGIC* mg -p |int |magic_freeovrld|SV* sv|MAGIC* mg -p |int |magic_get |SV* sv|MAGIC* mg +ApdR |bool |grok_numeric_radix|NN const char **sp|NN const char *send +Apd |UV |grok_oct |NN const char* start|STRLEN* len_p|I32* flags|NV *result +p |int |magic_clearenv |NN SV* sv|NN MAGIC* mg +p |int |magic_clear_all_env|NN SV* sv|NN MAGIC* mg +p |int |magic_clearpack|NN SV* sv|NN MAGIC* mg +p |int |magic_clearsig |NN SV* sv|NN MAGIC* mg +p |int |magic_existspack|NN SV* sv|NN MAGIC* mg +p |int |magic_freeregexp|NN SV* sv|NN MAGIC* mg +p |int |magic_freeovrld|NN SV* sv|NN MAGIC* mg +p |int |magic_get |NN SV* sv|NN MAGIC* mg p |int |magic_getarylen|NN SV* sv|NN const MAGIC* mg -p |int |magic_getdefelem|SV* sv|MAGIC* mg -p |int |magic_getglob |SV* sv|MAGIC* mg -p |int |magic_getnkeys |SV* sv|MAGIC* mg -p |int |magic_getpack |SV* sv|MAGIC* mg -p |int |magic_getpos |SV* sv|MAGIC* mg -p |int |magic_getsig |SV* sv|MAGIC* mg -p |int |magic_getsubstr|SV* sv|MAGIC* mg -p |int |magic_gettaint |SV* sv|MAGIC* mg -p |int |magic_getuvar |SV* sv|MAGIC* mg -p |int |magic_getvec |SV* sv|MAGIC* mg -p |U32 |magic_len |SV* sv|MAGIC* mg -p |int |magic_nextpack |SV* sv|MAGIC* mg|SV* key -p |U32 |magic_regdata_cnt|SV* sv|MAGIC* mg -p |int |magic_regdatum_get|SV* sv|MAGIC* mg -pr |int |magic_regdatum_set|SV* sv|MAGIC* mg -p |int |magic_set |SV* sv|MAGIC* mg -p |int |magic_setamagic|SV* sv|MAGIC* mg -p |int |magic_setarylen|SV* sv|MAGIC* mg -p |int |magic_freearylen_p|SV* sv|MAGIC* mg -p |int |magic_setbm |SV* sv|MAGIC* mg -p |int |magic_setdbline|SV* sv|MAGIC* mg -p |int |magic_setdefelem|SV* sv|MAGIC* mg -p |int |magic_setenv |SV* sv|MAGIC* mg -p |int |magic_setfm |SV* sv|MAGIC* mg -p |int |magic_setisa |SV* sv|MAGIC* mg -p |int |magic_setglob |SV* sv|MAGIC* mg -p |int |magic_setmglob |SV* sv|MAGIC* mg -p |int |magic_setnkeys |SV* sv|MAGIC* mg -p |int |magic_setpack |SV* sv|MAGIC* mg -p |int |magic_setpos |SV* sv|MAGIC* mg -p |int |magic_setregexp|SV* sv|MAGIC* mg -p |int |magic_setsig |SV* sv|MAGIC* mg -p |int |magic_setsubstr|SV* sv|MAGIC* mg -p |int |magic_settaint |SV* sv|MAGIC* mg -p |int |magic_setuvar |SV* sv|MAGIC* mg -p |int |magic_setvec |SV* sv|MAGIC* mg -p |int |magic_setutf8 |SV* sv|MAGIC* mg -p |int |magic_set_all_env|SV* sv|MAGIC* mg -p |U32 |magic_sizepack |SV* sv|MAGIC* mg -p |int |magic_wipepack |SV* sv|MAGIC* mg -p |void |magicname |const char* sym|const char* name|I32 namlen +p |int |magic_getdefelem|NN SV* sv|NN MAGIC* mg +p |int |magic_getglob |NN SV* sv|NN MAGIC* mg +p |int |magic_getnkeys |NN SV* sv|NN MAGIC* mg +p |int |magic_getpack |NN SV* sv|NN MAGIC* mg +p |int |magic_getpos |NN SV* sv|NN MAGIC* mg +p |int |magic_getsig |NN SV* sv|NN MAGIC* mg +p |int |magic_getsubstr|NN SV* sv|NN MAGIC* mg +p |int |magic_gettaint |NN SV* sv|NN MAGIC* mg +p |int |magic_getuvar |NN SV* sv|NN MAGIC* mg +p |int |magic_getvec |NN SV* sv|NN MAGIC* mg +p |U32 |magic_len |NN SV* sv|NN MAGIC* mg +p |int |magic_nextpack |NN SV* sv|NN MAGIC* mg|NN SV* key +p |U32 |magic_regdata_cnt|NN SV* sv|NN MAGIC* mg +p |int |magic_regdatum_get|NN SV* sv|NN MAGIC* mg +pr |int |magic_regdatum_set|NN SV* sv|NN MAGIC* mg +p |int |magic_set |NN SV* sv|NN MAGIC* mg +p |int |magic_setamagic|NN SV* sv|NN MAGIC* mg +p |int |magic_setarylen|NN SV* sv|NN MAGIC* mg +p |int |magic_freearylen_p|NN SV* sv|NN MAGIC* mg +p |int |magic_setbm |NN SV* sv|NN MAGIC* mg +p |int |magic_setdbline|NN SV* sv|NN MAGIC* mg +p |int |magic_setdefelem|NN SV* sv|NN MAGIC* mg +p |int |magic_setenv |NN SV* sv|NN MAGIC* mg +p |int |magic_setfm |NN SV* sv|NN MAGIC* mg +p |int |magic_setisa |NN SV* sv|NN MAGIC* mg +p |int |magic_setglob |NN SV* sv|NN MAGIC* mg +p |int |magic_setmglob |NN SV* sv|NN MAGIC* mg +p |int |magic_setnkeys |NN SV* sv|NN MAGIC* mg +p |int |magic_setpack |NN SV* sv|NN MAGIC* mg +p |int |magic_setpos |NN SV* sv|NN MAGIC* mg +p |int |magic_setregexp|NN SV* sv|NN MAGIC* mg +p |int |magic_setsig |NN SV* sv|NN MAGIC* mg +p |int |magic_setsubstr|NN SV* sv|NN MAGIC* mg +p |int |magic_settaint |NN SV* sv|NN MAGIC* mg +p |int |magic_setuvar |NN SV* sv|NN MAGIC* mg +p |int |magic_setvec |NN SV* sv|NN MAGIC* mg +p |int |magic_setutf8 |NN SV* sv|NN MAGIC* mg +p |int |magic_set_all_env|NN SV* sv|NN MAGIC* mg +p |U32 |magic_sizepack |NN SV* sv|NN MAGIC* mg +p |int |magic_wipepack |NN SV* sv|NN MAGIC* mg +p |void |magicname |NN const char* sym|NULLOK const char* name|I32 namlen Ap |void |markstack_grow #if defined(USE_LOCALE_COLLATE) p |int |magic_setcollxfrm|NN SV* sv|NN MAGIC* mg @@ -448,7 +448,7 @@ Ap |SV* |vmess |NN const char* pat|NULLOK va_list* args p |void |qerror |NN SV* err Apd |void |sortsv |NN SV** array|size_t num_elts|SVCOMPARE_t cmp Apd |int |mg_clear |NN SV* sv -Apd |int |mg_copy |NN SV* sv|NN SV* nsv|const char* key|I32 klen +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 ApdR |MAGIC* |mg_find |NULLOK const SV* sv|int type Apd |int |mg_free |NN SV* sv @@ -459,8 +459,8 @@ Apd |int |mg_set |NN SV* sv Ap |I32 |mg_size |NN SV* sv Ap |void |mini_mktime |NN struct tm *pm p |OP* |mod |NULLOK OP* o|I32 type -p |int |mode_from_discipline|SV* discp -Ap |char* |moreswitches |char* s +p |int |mode_from_discipline|NULLOK SV* discp +Ap |char* |moreswitches |NN char* s p |OP* |my |NN OP* o Ap |NV |my_atof |NN const char *s #if (!defined(HAS_MEMCPY) && !defined(HAS_BCOPY)) || (!defined(HAS_MEMMOVE) && !defined(HAS_SAFE_MEMCPY) && !defined(HAS_SAFE_BCOPY)) @@ -482,12 +482,12 @@ AnpP |I32 |my_memcmp |NN const char* s1|NN const char* s2|I32 len #if !defined(HAS_MEMSET) Anp |void* |my_memset |NN char* loc|I32 ch|I32 len #endif -Ap |I32 |my_pclose |PerlIO* ptr -Ap |PerlIO*|my_popen |const char* cmd|const char* mode -Ap |PerlIO*|my_popen_list |char* mode|int n|SV ** args -Ap |void |my_setenv |const char* nam|const char* val +Ap |I32 |my_pclose |NULLOK PerlIO* ptr +Ap |PerlIO*|my_popen |NN const char* cmd|NN const char* mode +Ap |PerlIO*|my_popen_list |NN char* mode|int n|NN SV ** args +Ap |void |my_setenv |NULLOK const char* nam|NULLOK const char* val Ap |I32 |my_stat -Ap |char * |my_strftime |const char *fmt|int sec|int min|int hour|int mday|int mon|int year|int wday|int yday|int isdst +Ap |char * |my_strftime |NN const char *fmt|int sec|int min|int hour|int mday|int mon|int year|int wday|int yday|int isdst #if defined(MYSWAP) ApPa |short |my_swap |short s ApPa |long |my_htonl |long l @@ -496,7 +496,7 @@ ApPa |long |my_ntohl |long l p |void |my_unexec Apa |OP* |newANONLIST |NULLOK OP* o Apa |OP* |newANONHASH |NULLOK OP* o -Ap |OP* |newANONSUB |I32 floor|OP* proto|OP* block +Ap |OP* |newANONSUB |I32 floor|NULLOK OP* proto|NULLOK OP* block Apa |OP* |newASSIGNOP |I32 flags|NULLOK OP* left|I32 optype|NULLOK OP* right Apa |OP* |newCONDOP |I32 flags|NN OP* first|NULLOK OP* trueop|NULLOK OP* falseop Apd |CV* |newCONSTSUB |NULLOK HV* stash|NULLOK const char* name|NULLOK SV* sv @@ -512,11 +512,11 @@ Ap |void |newPROG |NN OP* o Apa |OP* |newRANGE |I32 flags|NN OP* left|NN OP* right Apa |OP* |newSLICEOP |I32 flags|NULLOK OP* subscript|NULLOK OP* listop Apa |OP* |newSTATEOP |I32 flags|NULLOK char* label|NULLOK OP* o -Ap |CV* |newSUB |I32 floor|OP* o|OP* proto|OP* block +Ap |CV* |newSUB |I32 floor|NULLOK OP* o|NULLOK OP* proto|NULLOK OP* block Apd |CV* |newXS |NN const char* name|NN XSUBADDR_t f|NN const char* filename Apda |AV* |newAV Apa |OP* |newAVREF |NN OP* o -Apa |OP* |newBINOP |I32 type|I32 flags|OP* first|OP* last +Apa |OP* |newBINOP |I32 type|I32 flags|NULLOK OP* first|NULLOK OP* last Apa |OP* |newCVREF |I32 flags|NULLOK OP* o Apa |OP* |newGVOP |I32 type|I32 flags|NN GV* gv Apa |GV* |newGVgen |NN const char* pack @@ -525,10 +525,10 @@ ApaR |OP* |newHVREF |NN OP* o ApdaR |HV* |newHV ApaR |HV* |newHVhv |NULLOK HV* hv Apa |IO* |newIO -Apa |OP* |newLISTOP |I32 type|I32 flags|OP* first|OP* last +Apa |OP* |newLISTOP |I32 type|I32 flags|NULLOK OP* first|NULLOK OP* last Apa |OP* |newPADOP |I32 type|I32 flags|NULLOK SV* sv Apa |OP* |newPMOP |I32 type|I32 flags -Apa |OP* |newPVOP |I32 type|I32 flags|char* pv +Apa |OP* |newPVOP |I32 type|I32 flags|NULLOK char* pv Apa |SV* |newRV |NN SV* pref Apda |SV* |newRV_noinc |NN SV *sv Apda |SV* |newSV |STRLEN len diff --git a/lib/overload.pm b/lib/overload.pm index da290dd..b189044 100644 --- a/lib/overload.pm +++ b/lib/overload.pm @@ -718,7 +718,7 @@ Returns C or a reference to the method that implements C. =head1 Overloading constants For some applications, the Perl parser mangles constants too much. -It is possible to hook into this process via the C +It is possible to hook into this process via C and C functions. These functions take a hash as an argument. The recognized keys of this hash diff --git a/pp_pack.c b/pp_pack.c index b9e7479..784c852 100644 --- a/pp_pack.c +++ b/pp_pack.c @@ -2390,8 +2390,8 @@ S_div128(pTHX_ SV *pnum, bool *done) The engine implementing pack() Perl function. Note: parameters next_in_list and flags are not used. This call should not be used; use packlist instead. -=cut */ - +=cut +*/ void Perl_pack_cat(pTHX_ SV *cat, const char *pat, const char *patend, register SV **beglist, SV **endlist, SV ***next_in_list, U32 flags) @@ -2411,8 +2411,8 @@ Perl_pack_cat(pTHX_ SV *cat, const char *pat, const char *patend, register SV ** The engine implementing pack() Perl function. -=cut */ - +=cut +*/ void Perl_packlist(pTHX_ SV *cat, const char *pat, const char *patend, register SV **beglist, SV **endlist ) @@ -2425,7 +2425,8 @@ Perl_packlist(pTHX_ SV *cat, const char *pat, const char *patend, register SV ** /* We're going to do changes through SvPVX(cat). Make sure it's valid. Also make sure any UTF8 flag is loaded */ SvPV_force(cat, no_len); - if (DO_UTF8(cat)) sym.flags |= FLAG_PARSE_UTF8 | FLAG_DO_UTF8; + if (DO_UTF8(cat)) + sym.flags |= FLAG_PARSE_UTF8 | FLAG_DO_UTF8; (void)pack_rec( cat, &sym, beglist, endlist ); } diff --git a/proto.h b/proto.h index 437d904..98c3fd9 100644 --- a/proto.h +++ b/proto.h @@ -654,7 +654,9 @@ PERL_CALLCONV void Perl_init_argv_symbols(pTHX_ int argc, char **argv) PERL_CALLCONV void Perl_init_debugger(pTHX); PERL_CALLCONV void Perl_init_stacks(pTHX); -PERL_CALLCONV void Perl_init_tm(pTHX_ struct tm *ptm); +PERL_CALLCONV void Perl_init_tm(pTHX_ struct tm *ptm) + __attribute__nonnull__(pTHX_1); + PERL_CALLCONV U32 Perl_intro_my(pTHX); PERL_CALLCONV char* Perl_instr(pTHX_ const char* big, const char* little) __attribute__warn_unused_result__ @@ -901,7 +903,9 @@ PERL_CALLCONV I32 Perl_keyword(pTHX_ const char* d, I32 len) PERL_CALLCONV void Perl_leave_scope(pTHX_ I32 base); PERL_CALLCONV void Perl_lex_end(pTHX); -PERL_CALLCONV void Perl_lex_start(pTHX_ SV* line); +PERL_CALLCONV void Perl_lex_start(pTHX_ SV* line) + __attribute__nonnull__(pTHX_1); + PERL_CALLCONV void Perl_op_null(pTHX_ OP* o) __attribute__nonnull__(pTHX_1); @@ -921,7 +925,9 @@ PERL_CALLCONV void Perl_load_module(pTHX_ U32 flags, SV* name, SV* ver, ...) PERL_CALLCONV void Perl_vload_module(pTHX_ U32 flags, SV* name, SV* ver, va_list* args) __attribute__nonnull__(pTHX_2); -PERL_CALLCONV OP* Perl_localize(pTHX_ OP* arg, I32 lexical); +PERL_CALLCONV OP* Perl_localize(pTHX_ OP* arg, I32 lexical) + __attribute__nonnull__(pTHX_1); + PERL_CALLCONV I32 Perl_looks_like_number(pTHX_ SV* sv) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); @@ -940,64 +946,214 @@ PERL_CALLCONV int Perl_grok_number(pTHX_ const char *pv, STRLEN len, UV *valuep) __attribute__nonnull__(pTHX_1); PERL_CALLCONV bool Perl_grok_numeric_radix(pTHX_ const char **sp, const char *send) - __attribute__warn_unused_result__; + __attribute__warn_unused_result__ + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); + +PERL_CALLCONV UV Perl_grok_oct(pTHX_ const char* start, STRLEN* len_p, I32* flags, NV *result) + __attribute__nonnull__(pTHX_1); + +PERL_CALLCONV int Perl_magic_clearenv(pTHX_ SV* sv, MAGIC* mg) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); + +PERL_CALLCONV int Perl_magic_clear_all_env(pTHX_ SV* sv, MAGIC* mg) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); + +PERL_CALLCONV int Perl_magic_clearpack(pTHX_ SV* sv, MAGIC* mg) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); + +PERL_CALLCONV int Perl_magic_clearsig(pTHX_ SV* sv, MAGIC* mg) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); + +PERL_CALLCONV int Perl_magic_existspack(pTHX_ SV* sv, MAGIC* mg) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); + +PERL_CALLCONV int Perl_magic_freeregexp(pTHX_ SV* sv, MAGIC* mg) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); + +PERL_CALLCONV int Perl_magic_freeovrld(pTHX_ SV* sv, MAGIC* mg) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); + +PERL_CALLCONV int Perl_magic_get(pTHX_ SV* sv, MAGIC* mg) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); -PERL_CALLCONV UV Perl_grok_oct(pTHX_ const char* start, STRLEN* len_p, I32* flags, NV *result); -PERL_CALLCONV int Perl_magic_clearenv(pTHX_ SV* sv, MAGIC* mg); -PERL_CALLCONV int Perl_magic_clear_all_env(pTHX_ SV* sv, MAGIC* mg); -PERL_CALLCONV int Perl_magic_clearpack(pTHX_ SV* sv, MAGIC* mg); -PERL_CALLCONV int Perl_magic_clearsig(pTHX_ SV* sv, MAGIC* mg); -PERL_CALLCONV int Perl_magic_existspack(pTHX_ SV* sv, MAGIC* mg); -PERL_CALLCONV int Perl_magic_freeregexp(pTHX_ SV* sv, MAGIC* mg); -PERL_CALLCONV int Perl_magic_freeovrld(pTHX_ SV* sv, MAGIC* mg); -PERL_CALLCONV int Perl_magic_get(pTHX_ SV* sv, MAGIC* mg); PERL_CALLCONV int Perl_magic_getarylen(pTHX_ SV* sv, const MAGIC* mg) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); -PERL_CALLCONV int Perl_magic_getdefelem(pTHX_ SV* sv, MAGIC* mg); -PERL_CALLCONV int Perl_magic_getglob(pTHX_ SV* sv, MAGIC* mg); -PERL_CALLCONV int Perl_magic_getnkeys(pTHX_ SV* sv, MAGIC* mg); -PERL_CALLCONV int Perl_magic_getpack(pTHX_ SV* sv, MAGIC* mg); -PERL_CALLCONV int Perl_magic_getpos(pTHX_ SV* sv, MAGIC* mg); -PERL_CALLCONV int Perl_magic_getsig(pTHX_ SV* sv, MAGIC* mg); -PERL_CALLCONV int Perl_magic_getsubstr(pTHX_ SV* sv, MAGIC* mg); -PERL_CALLCONV int Perl_magic_gettaint(pTHX_ SV* sv, MAGIC* mg); -PERL_CALLCONV int Perl_magic_getuvar(pTHX_ SV* sv, MAGIC* mg); -PERL_CALLCONV int Perl_magic_getvec(pTHX_ SV* sv, MAGIC* mg); -PERL_CALLCONV U32 Perl_magic_len(pTHX_ SV* sv, MAGIC* mg); -PERL_CALLCONV int Perl_magic_nextpack(pTHX_ SV* sv, MAGIC* mg, SV* key); -PERL_CALLCONV U32 Perl_magic_regdata_cnt(pTHX_ SV* sv, MAGIC* mg); -PERL_CALLCONV int Perl_magic_regdatum_get(pTHX_ SV* sv, MAGIC* mg); +PERL_CALLCONV int Perl_magic_getdefelem(pTHX_ SV* sv, MAGIC* mg) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); + +PERL_CALLCONV int Perl_magic_getglob(pTHX_ SV* sv, MAGIC* mg) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); + +PERL_CALLCONV int Perl_magic_getnkeys(pTHX_ SV* sv, MAGIC* mg) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); + +PERL_CALLCONV int Perl_magic_getpack(pTHX_ SV* sv, MAGIC* mg) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); + +PERL_CALLCONV int Perl_magic_getpos(pTHX_ SV* sv, MAGIC* mg) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); + +PERL_CALLCONV int Perl_magic_getsig(pTHX_ SV* sv, MAGIC* mg) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); + +PERL_CALLCONV int Perl_magic_getsubstr(pTHX_ SV* sv, MAGIC* mg) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); + +PERL_CALLCONV int Perl_magic_gettaint(pTHX_ SV* sv, MAGIC* mg) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); + +PERL_CALLCONV int Perl_magic_getuvar(pTHX_ SV* sv, MAGIC* mg) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); + +PERL_CALLCONV int Perl_magic_getvec(pTHX_ SV* sv, MAGIC* mg) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); + +PERL_CALLCONV U32 Perl_magic_len(pTHX_ SV* sv, MAGIC* mg) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); + +PERL_CALLCONV int Perl_magic_nextpack(pTHX_ SV* sv, MAGIC* mg, SV* key) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2) + __attribute__nonnull__(pTHX_3); + +PERL_CALLCONV U32 Perl_magic_regdata_cnt(pTHX_ SV* sv, MAGIC* mg) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); + +PERL_CALLCONV int Perl_magic_regdatum_get(pTHX_ SV* sv, MAGIC* mg) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); + PERL_CALLCONV int Perl_magic_regdatum_set(pTHX_ SV* sv, MAGIC* mg) - __attribute__noreturn__; + __attribute__noreturn__ + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); + +PERL_CALLCONV int Perl_magic_set(pTHX_ SV* sv, MAGIC* mg) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); + +PERL_CALLCONV int Perl_magic_setamagic(pTHX_ SV* sv, MAGIC* mg) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); + +PERL_CALLCONV int Perl_magic_setarylen(pTHX_ SV* sv, MAGIC* mg) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); + +PERL_CALLCONV int Perl_magic_freearylen_p(pTHX_ SV* sv, MAGIC* mg) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); + +PERL_CALLCONV int Perl_magic_setbm(pTHX_ SV* sv, MAGIC* mg) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); + +PERL_CALLCONV int Perl_magic_setdbline(pTHX_ SV* sv, MAGIC* mg) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); + +PERL_CALLCONV int Perl_magic_setdefelem(pTHX_ SV* sv, MAGIC* mg) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); + +PERL_CALLCONV int Perl_magic_setenv(pTHX_ SV* sv, MAGIC* mg) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); + +PERL_CALLCONV int Perl_magic_setfm(pTHX_ SV* sv, MAGIC* mg) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); + +PERL_CALLCONV int Perl_magic_setisa(pTHX_ SV* sv, MAGIC* mg) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); + +PERL_CALLCONV int Perl_magic_setglob(pTHX_ SV* sv, MAGIC* mg) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); + +PERL_CALLCONV int Perl_magic_setmglob(pTHX_ SV* sv, MAGIC* mg) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); + +PERL_CALLCONV int Perl_magic_setnkeys(pTHX_ SV* sv, MAGIC* mg) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); + +PERL_CALLCONV int Perl_magic_setpack(pTHX_ SV* sv, MAGIC* mg) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); + +PERL_CALLCONV int Perl_magic_setpos(pTHX_ SV* sv, MAGIC* mg) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); + +PERL_CALLCONV int Perl_magic_setregexp(pTHX_ SV* sv, MAGIC* mg) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); + +PERL_CALLCONV int Perl_magic_setsig(pTHX_ SV* sv, MAGIC* mg) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); + +PERL_CALLCONV int Perl_magic_setsubstr(pTHX_ SV* sv, MAGIC* mg) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); + +PERL_CALLCONV int Perl_magic_settaint(pTHX_ SV* sv, MAGIC* mg) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); + +PERL_CALLCONV int Perl_magic_setuvar(pTHX_ SV* sv, MAGIC* mg) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); + +PERL_CALLCONV int Perl_magic_setvec(pTHX_ SV* sv, MAGIC* mg) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); + +PERL_CALLCONV int Perl_magic_setutf8(pTHX_ SV* sv, MAGIC* mg) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); + +PERL_CALLCONV int Perl_magic_set_all_env(pTHX_ SV* sv, MAGIC* mg) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); + +PERL_CALLCONV U32 Perl_magic_sizepack(pTHX_ SV* sv, MAGIC* mg) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); + +PERL_CALLCONV int Perl_magic_wipepack(pTHX_ SV* sv, MAGIC* mg) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); + +PERL_CALLCONV void Perl_magicname(pTHX_ const char* sym, const char* name, I32 namlen) + __attribute__nonnull__(pTHX_1); -PERL_CALLCONV int Perl_magic_set(pTHX_ SV* sv, MAGIC* mg); -PERL_CALLCONV int Perl_magic_setamagic(pTHX_ SV* sv, MAGIC* mg); -PERL_CALLCONV int Perl_magic_setarylen(pTHX_ SV* sv, MAGIC* mg); -PERL_CALLCONV int Perl_magic_freearylen_p(pTHX_ SV* sv, MAGIC* mg); -PERL_CALLCONV int Perl_magic_setbm(pTHX_ SV* sv, MAGIC* mg); -PERL_CALLCONV int Perl_magic_setdbline(pTHX_ SV* sv, MAGIC* mg); -PERL_CALLCONV int Perl_magic_setdefelem(pTHX_ SV* sv, MAGIC* mg); -PERL_CALLCONV int Perl_magic_setenv(pTHX_ SV* sv, MAGIC* mg); -PERL_CALLCONV int Perl_magic_setfm(pTHX_ SV* sv, MAGIC* mg); -PERL_CALLCONV int Perl_magic_setisa(pTHX_ SV* sv, MAGIC* mg); -PERL_CALLCONV int Perl_magic_setglob(pTHX_ SV* sv, MAGIC* mg); -PERL_CALLCONV int Perl_magic_setmglob(pTHX_ SV* sv, MAGIC* mg); -PERL_CALLCONV int Perl_magic_setnkeys(pTHX_ SV* sv, MAGIC* mg); -PERL_CALLCONV int Perl_magic_setpack(pTHX_ SV* sv, MAGIC* mg); -PERL_CALLCONV int Perl_magic_setpos(pTHX_ SV* sv, MAGIC* mg); -PERL_CALLCONV int Perl_magic_setregexp(pTHX_ SV* sv, MAGIC* mg); -PERL_CALLCONV int Perl_magic_setsig(pTHX_ SV* sv, MAGIC* mg); -PERL_CALLCONV int Perl_magic_setsubstr(pTHX_ SV* sv, MAGIC* mg); -PERL_CALLCONV int Perl_magic_settaint(pTHX_ SV* sv, MAGIC* mg); -PERL_CALLCONV int Perl_magic_setuvar(pTHX_ SV* sv, MAGIC* mg); -PERL_CALLCONV int Perl_magic_setvec(pTHX_ SV* sv, MAGIC* mg); -PERL_CALLCONV int Perl_magic_setutf8(pTHX_ SV* sv, MAGIC* mg); -PERL_CALLCONV int Perl_magic_set_all_env(pTHX_ SV* sv, MAGIC* mg); -PERL_CALLCONV U32 Perl_magic_sizepack(pTHX_ SV* sv, MAGIC* mg); -PERL_CALLCONV int Perl_magic_wipepack(pTHX_ SV* sv, MAGIC* mg); -PERL_CALLCONV void Perl_magicname(pTHX_ const char* sym, const char* name, I32 namlen); PERL_CALLCONV void Perl_markstack_grow(pTHX); #if defined(USE_LOCALE_COLLATE) PERL_CALLCONV int Perl_magic_setcollxfrm(pTHX_ SV* sv, MAGIC* mg) @@ -1059,7 +1215,9 @@ PERL_CALLCONV void Perl_mini_mktime(pTHX_ struct tm *pm) PERL_CALLCONV OP* Perl_mod(pTHX_ OP* o, I32 type); PERL_CALLCONV int Perl_mode_from_discipline(pTHX_ SV* discp); -PERL_CALLCONV char* Perl_moreswitches(pTHX_ char* s); +PERL_CALLCONV char* Perl_moreswitches(pTHX_ char* s) + __attribute__nonnull__(pTHX_1); + PERL_CALLCONV OP* Perl_my(pTHX_ OP* o) __attribute__nonnull__(pTHX_1); @@ -1101,11 +1259,19 @@ PERL_CALLCONV void* Perl_my_memset(char* loc, I32 ch, I32 len) #endif PERL_CALLCONV I32 Perl_my_pclose(pTHX_ PerlIO* ptr); -PERL_CALLCONV PerlIO* Perl_my_popen(pTHX_ const char* cmd, const char* mode); -PERL_CALLCONV PerlIO* Perl_my_popen_list(pTHX_ char* mode, int n, SV ** args); +PERL_CALLCONV PerlIO* Perl_my_popen(pTHX_ const char* cmd, const char* mode) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); + +PERL_CALLCONV PerlIO* Perl_my_popen_list(pTHX_ char* mode, int n, SV ** args) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_3); + PERL_CALLCONV void Perl_my_setenv(pTHX_ const char* nam, const char* val); PERL_CALLCONV I32 Perl_my_stat(pTHX); -PERL_CALLCONV char * Perl_my_strftime(pTHX_ const char *fmt, int sec, int min, int hour, int mday, int mon, int year, int wday, int yday, int isdst); +PERL_CALLCONV char * Perl_my_strftime(pTHX_ const char *fmt, int sec, int min, int hour, int mday, int mon, int year, int wday, int yday, int isdst) + __attribute__nonnull__(pTHX_1); + #if defined(MYSWAP) PERL_CALLCONV short Perl_my_swap(pTHX_ short s) __attribute__malloc__ diff --git a/util.c b/util.c index 8dd0784..2f5e2c3 100644 --- a/util.c +++ b/util.c @@ -2129,7 +2129,7 @@ Perl_my_popen(pTHX_ const char *cmd, const char *mode) register I32 This, that; register Pid_t pid; SV *sv; - I32 doexec = !(*cmd == '-' && cmd[1] == '\0'); + const I32 doexec = !(*cmd == '-' && cmd[1] == '\0'); I32 did_pipes = 0; int pp[2];