From: Andy Lester Date: Mon, 18 Jul 2005 10:37:38 +0000 (-0500) Subject: The continuing plod through embed.fnc X-Git-Tag: accepted/trunk/20130322.191538~20088 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9a957fbc017c803266bc4e3766dfcbfb58cfa99b;p=platform%2Fupstream%2Fperl.git The continuing plod through embed.fnc Message-ID: <20050718153738.GB20193@petdance.com> p4raw-id: //depot/perl@25172 --- diff --git a/embed.fnc b/embed.fnc index a3d0357..5b59e71 100644 --- a/embed.fnc +++ b/embed.fnc @@ -226,13 +226,13 @@ ApR |I32 |dowantarray Ap |void |dump_all Ap |void |dump_eval #if defined(DUMP_FDS) -Ap |void |dump_fds |char* s +Ap |void |dump_fds |NN char* s #endif -Ap |void |dump_form |const GV* gv +Ap |void |dump_form |NN const GV* gv Ap |void |gv_dump |NN GV* gv Ap |void |op_dump |NN const OP* arg -Ap |void |pmop_dump |PMOP* pm -Ap |void |dump_packsubs |const HV* stash +Ap |void |pmop_dump |NULLOK PMOP* pm +Ap |void |dump_packsubs |NN const HV* stash Ap |void |dump_sub |NN const GV* gv Apd |void |fbm_compile |NN SV* sv|U32 flags ApdR |char* |fbm_instr |NN unsigned char* big|NN unsigned char* bigend \ @@ -266,10 +266,10 @@ Apd |GV* |gv_fetchmeth_autoload |HV* stash|const char* name|STRLEN len \ Apd |GV* |gv_fetchmethod |HV* stash|const char* name Apd |GV* |gv_fetchmethod_autoload|HV* stash|const char* name \ |I32 autoload -Ap |GV* |gv_fetchpv |const char* name|I32 add|I32 sv_type -Ap |void |gv_fullname |SV* sv|const GV* gv -Apmb |void |gv_fullname3 |SV* sv|const GV* gv|const char* prefix -Ap |void |gv_fullname4 |SV* sv|const GV* gv|const char* prefix|bool keepmain +Ap |GV* |gv_fetchpv |NN const char* name|I32 add|I32 sv_type +Ap |void |gv_fullname |NN SV* sv|NN const GV* gv +Apmb |void |gv_fullname3 |NN SV* sv|NN const GV* gv|NULLOK const char* prefix +Ap |void |gv_fullname4 |NN SV* sv|NN const GV* gv|NULLOK const char* prefix|bool keepmain Ap |void |gv_init |NN GV* gv|HV* stash|NN const char* name|STRLEN len|int multi Apd |HV* |gv_stashpv |const char* name|I32 create Apd |HV* |gv_stashpvn |const char* name|U32 namelen|I32 create @@ -447,18 +447,18 @@ Afp |SV* |mess |NN const char* pat|... Ap |SV* |vmess |NN const char* pat|NULLOK va_list* args p |void |qerror |SV* err Apd |void |sortsv |SV ** array|size_t num_elts|SVCOMPARE_t cmp -Apd |int |mg_clear |SV* sv -Apd |int |mg_copy |SV* sv|SV* nsv|const char* key|I32 klen -pd |void |mg_localize |SV* sv|SV* nsv +Apd |int |mg_clear |NN SV* sv +Apd |int |mg_copy |NN SV* sv|NN SV* nsv|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 |SV* sv -Apd |int |mg_get |SV* sv -Apd |U32 |mg_length |SV* sv -Apd |void |mg_magical |SV* sv -Apd |int |mg_set |SV* sv -Ap |I32 |mg_size |SV* sv -Ap |void |mini_mktime |struct tm *pm -p |OP* |mod |OP* o|I32 type +Apd |int |mg_free |NN SV* sv +Apd |int |mg_get |NN SV* sv +Apd |U32 |mg_length |NN SV* sv +Apd |void |mg_magical |NN SV* sv +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 |OP* |my |NN OP* o @@ -499,7 +499,7 @@ Apa |OP* |newANONHASH |OP* o Ap |OP* |newANONSUB |I32 floor|OP* proto|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|NN const char* name|NULLOK SV* sv +Apd |CV* |newCONSTSUB |NULLOK HV* stash|NULLOK const char* name|NULLOK SV* sv Ap |void |newFORM |I32 floor|NULLOK OP* o|NULLOK OP* block Apa |OP* |newFOROP |I32 flags|char* label|line_t forline \ |OP* sclr|OP* expr|OP*block|OP*cont @@ -513,7 +513,7 @@ Apa |OP* |newRANGE |I32 flags|OP* left|OP* right Apa |OP* |newSLICEOP |I32 flags|OP* subscript|OP* listop Apa |OP* |newSTATEOP |I32 flags|char* label|OP* o Ap |CV* |newSUB |I32 floor|OP* o|OP* proto|OP* block -Apd |CV* |newXS |NN const char* name|XSUBADDR_t f|NN const char* filename +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 @@ -613,14 +613,14 @@ p |OP* |pmtrans |NN OP* o|NN OP* expr|OP* repl Ap |void |pop_scope p |OP* |prepend_elem |I32 optype|OP* head|OP* tail Ap |void |push_scope -p |OP* |ref |OP* o|I32 type -p |OP* |refkids |OP* o|I32 type +p |OP* |ref |NULLOK OP* o|I32 type +p |OP* |refkids |NULLOK OP* o|I32 type Ap |void |regdump |NN regexp* r Ap |SV* |regclass_swash |const struct regnode *n|bool doinit|SV **listsvp|SV **altsvp Ap |I32 |pregexec |NN regexp* prog|NN char* stringarg \ |NN char* strend|NN char* strbeg|I32 minend \ |NN SV* screamer|U32 nosave -Ap |void |pregfree |struct regexp* r +Ap |void |pregfree |NULLOK struct regexp* r Ap |regexp*|pregcomp |NN char* exp|NN char* xend|NN PMOP* pm Ap |char* |re_intuit_start|regexp* prog|SV* sv|char* strpos \ |char* strend|U32 flags \ @@ -636,7 +636,7 @@ ApP |char* |rninstr |NN const char* big|NN const char* bigend \ |NN const char* little|NN const char* lend Ap |Sighandler_t|rsignal |int i|Sighandler_t t p |int |rsignal_restore|int i|Sigsave_t* t -p |int |rsignal_save |int i|Sighandler_t t1|Sigsave_t* t2 +p |int |rsignal_save |int i|Sighandler_t t1|NN Sigsave_t* t2 Ap |Sighandler_t|rsignal_state|int i p |void |rxres_free |NN void** rsp p |void |rxres_restore |NN void** rsp|NN REGEXP* prx @@ -650,24 +650,24 @@ Apda |char* |savesharedpv |const char* pv Apda |char* |savesvpv |NN SV* sv Ap |void |savestack_grow Ap |void |savestack_grow_cnt |I32 need -Ap |void |save_aelem |const AV* av|I32 idx|SV **sptr +Ap |void |save_aelem |NN const AV* av|I32 idx|NN SV **sptr Ap |I32 |save_alloc |I32 size|I32 pad -Ap |void |save_aptr |AV** aptr -Ap |AV* |save_ary |GV* gv -Ap |void |save_bool |bool* boolp -Ap |void |save_clearsv |SV** svp -Ap |void |save_delete |HV* hv|char* key|I32 klen +Ap |void |save_aptr |NN AV** aptr +Ap |AV* |save_ary |NN GV* gv +Ap |void |save_bool |NN bool* boolp +Ap |void |save_clearsv |NN SV** svp +Ap |void |save_delete |NN HV* hv|NN char* key|I32 klen Ap |void |save_destructor|DESTRUCTORFUNC_NOCONTEXT_t f|void* p Ap |void |save_destructor_x|DESTRUCTORFUNC_t f|void* p Ap |void |save_freesv |SV* sv p |void |save_freeop |OP* o Ap |void |save_freepv |char* pv -Ap |void |save_generic_svref|SV** sptr -Ap |void |save_generic_pvref|char** str -Ap |void |save_shared_pvref|char** str +Ap |void |save_generic_svref|NN SV** sptr +Ap |void |save_generic_pvref|NN char** str +Ap |void |save_shared_pvref|NN char** str Ap |void |save_gp |NN GV* gv|I32 empty Ap |HV* |save_hash |NN GV* gv -Ap |void |save_helem |HV* hv|SV *key|SV **sptr +Ap |void |save_helem |NN HV* hv|NN SV *key|NN SV **sptr Apr |void |save_hints Ap |void |save_hptr |NN HV** hptr Ap |void |save_I16 |NN I16* intp @@ -820,11 +820,12 @@ Ap |SV* |swash_init |NN const char* pkg|NN const char* name|NN SV* listsv|I32 mi Ap |UV |swash_fetch |NN SV *sv|NN const U8 *ptr|bool do_utf8 Ap |void |taint_env Ap |void |taint_proper |NULLOK const char* f|NN const char* s -Apd |UV |to_utf8_case |NN const U8 *p|NN U8* ustrp|STRLEN *lenp|SV **swash|const char *normal|const char *special -Apd |UV |to_utf8_lower |NN const U8 *p|NN U8* ustrp|STRLEN *lenp -Apd |UV |to_utf8_upper |NN const U8 *p|NN U8* ustrp|STRLEN *lenp -Apd |UV |to_utf8_title |NN const U8 *p|NN U8* ustrp|STRLEN *lenp -Apd |UV |to_utf8_fold |NN const U8 *p|NN U8* ustrp|STRLEN *lenp +Apd |UV |to_utf8_case |NN const U8 *p|NN U8* ustrp|NULLOK STRLEN *lenp \ + |NN SV **swashp|const char *normal|const char *special +Apd |UV |to_utf8_lower |NN const U8 *p|NN U8* ustrp|NULLOK STRLEN *lenp +Apd |UV |to_utf8_upper |NN const U8 *p|NN U8* ustrp|NULLOK STRLEN *lenp +Apd |UV |to_utf8_title |NN const U8 *p|NN U8* ustrp|NULLOK STRLEN *lenp +Apd |UV |to_utf8_fold |NN const U8 *p|NN U8* ustrp|NULLOK STRLEN *lenp #if defined(UNLINK_ALL_VERSIONS) Ap |I32 |unlnk |NN char* f #endif @@ -1196,7 +1197,7 @@ Es |void |cl_and |NN struct regnode_charclass_class *cl \ Es |void |cl_or |NN struct RExC_state_t*|NN struct regnode_charclass_class *cl \ |NN const struct regnode_charclass_class *or_with Es |I32 |study_chunk |NN struct RExC_state_t* pRExC_state|NN regnode **scanp \ - |NN I32 *deltap|NN regnode *last|NN struct scan_data_t *data \ + |NN I32 *deltap|NN regnode *last|NULLOK struct scan_data_t *data \ |U32 flags|U32 depth Es |I32 |add_data |NN struct RExC_state_t*|I32 n|NN const char *s rs |void |re_croak2 |NN const char* pat1|NN const char* pat2|... diff --git a/op.c b/op.c index c541fd1..ac1311d 100644 --- a/op.c +++ b/op.c @@ -4630,7 +4630,7 @@ Used by C to hook up XSUBs as Perl subs. CV * Perl_newXS(pTHX_ const char *name, XSUBADDR_t subaddr, const char *filename) { - GV *gv = gv_fetchpv(name ? name : + GV * const gv = gv_fetchpv(name ? name : (PL_curstash ? "__ANON__" : "__ANON__::__ANON__"), GV_ADDMULTI, SVt_PVCV); register CV *cv; diff --git a/pad.c b/pad.c index db1ee0f..2af57ef 100644 --- a/pad.c +++ b/pad.c @@ -1505,7 +1505,7 @@ Perl_cv_clone(pTHX_ CV *proto) SV* const_sv = op_const_sv(CvSTART(cv), cv); if (const_sv) { SvREFCNT_dec(cv); - cv = newCONSTSUB(CvSTASH(proto), 0, const_sv); + cv = newCONSTSUB(CvSTASH(proto), Nullch, const_sv); } else { CvCONST_off(cv); diff --git a/pod/perlapi.pod b/pod/perlapi.pod index 8dfce33..0d8a2cc 100644 --- a/pod/perlapi.pod +++ b/pod/perlapi.pod @@ -5455,7 +5455,7 @@ Perl_to_utf8_case(). The "normal" is a string like "ToLower" which means the swash %utf8::ToLower. - UV to_utf8_case(const U8 *p, U8* ustrp, STRLEN *lenp, SV **swash, const char *normal, const char *special) + UV to_utf8_case(const U8 *p, U8* ustrp, STRLEN *lenp, SV **swashp, const char *normal, const char *special) =for hackers Found in file utf8.c @@ -5529,7 +5529,7 @@ length, in bytes, of that character. Allows length and flags to be passed to low level routine. - UV utf8n_to_uvchr(const U8 *s, STRLEN curlen, STRLEN* retlen, U32 flags) + UV utf8n_to_uvchr(const U8 *s, STRLEN curlen, STRLEN *retlen, U32 flags) =for hackers Found in file utf8.c @@ -5554,7 +5554,7 @@ the strict UTF-8 encoding (see F). Most code should use utf8_to_uvchr() rather than call this directly. - UV utf8n_to_uvuni(const U8 *s, STRLEN curlen, STRLEN* retlen, U32 flags) + UV utf8n_to_uvuni(const U8 *s, STRLEN curlen, STRLEN *retlen, U32 flags) =for hackers Found in file utf8.c @@ -5621,7 +5621,7 @@ length, in bytes, of that character. If C does not point to a well-formed UTF-8 character, zero is returned and retlen is set, if possible, to -1. - UV utf8_to_uvchr(const U8 *s, STRLEN* retlen) + UV utf8_to_uvchr(const U8 *s, STRLEN *retlen) =for hackers Found in file utf8.c @@ -5638,7 +5638,7 @@ an index into the Unicode semantic tables (e.g. swashes). If C does not point to a well-formed UTF-8 character, zero is returned and retlen is set, if possible, to -1. - UV utf8_to_uvuni(const U8 *s, STRLEN* retlen) + UV utf8_to_uvuni(const U8 *s, STRLEN *retlen) =for hackers Found in file utf8.c diff --git a/pp_sys.c b/pp_sys.c index 4430789..63eebef 100644 --- a/pp_sys.c +++ b/pp_sys.c @@ -3543,11 +3543,10 @@ PP(pp_chdir) { dSP; dTARGET; const char *tmps = 0; - GV *gv = 0; - SV **svp; + GV *gv = NULL; if( MAXARG == 1 ) { - SV *sv = POPs; + SV * const sv = POPs; if (SvTYPE(sv) == SVt_PVGV) { gv = (GV*)sv; } @@ -3560,10 +3559,13 @@ PP(pp_chdir) } if( !gv && (!tmps || !*tmps) ) { - if ( (svp = hv_fetch(GvHVn(PL_envgv), "HOME", 4, FALSE)) - || (svp = hv_fetch(GvHVn(PL_envgv), "LOGDIR", 6, FALSE)) + HV * const table = GvHVn(PL_envgv); + SV **svp; + + if ( (svp = hv_fetch(table, "HOME", 4, FALSE)) + || (svp = hv_fetch(table, "LOGDIR", 6, FALSE)) #ifdef VMS - || (svp = hv_fetch(GvHVn(PL_envgv), "SYS$LOGIN", 9, FALSE)) + || (svp = hv_fetch(table, "SYS$LOGIN", 9, FALSE)) #endif ) { @@ -3581,7 +3583,7 @@ PP(pp_chdir) TAINT_PROPER("chdir"); if (gv) { #ifdef HAS_FCHDIR - IO* io = GvIO(gv); + IO* const io = GvIO(gv); if (io) { if (IoIFP(io)) { PUSHi(fchdir(PerlIO_fileno(IoIFP(io))) >= 0); diff --git a/proto.h b/proto.h index b1e5207..fd80677 100644 --- a/proto.h +++ b/proto.h @@ -458,9 +458,13 @@ PERL_CALLCONV I32 Perl_dowantarray(pTHX) PERL_CALLCONV void Perl_dump_all(pTHX); PERL_CALLCONV void Perl_dump_eval(pTHX); #if defined(DUMP_FDS) -PERL_CALLCONV void Perl_dump_fds(pTHX_ char* s); +PERL_CALLCONV void Perl_dump_fds(pTHX_ char* s) + __attribute__nonnull__(pTHX_1); + #endif -PERL_CALLCONV void Perl_dump_form(pTHX_ const GV* gv); +PERL_CALLCONV void Perl_dump_form(pTHX_ const GV* gv) + __attribute__nonnull__(pTHX_1); + PERL_CALLCONV void Perl_gv_dump(pTHX_ GV* gv) __attribute__nonnull__(pTHX_1); @@ -468,7 +472,9 @@ PERL_CALLCONV void Perl_op_dump(pTHX_ const OP* arg) __attribute__nonnull__(pTHX_1); PERL_CALLCONV void Perl_pmop_dump(pTHX_ PMOP* pm); -PERL_CALLCONV void Perl_dump_packsubs(pTHX_ const HV* stash); +PERL_CALLCONV void Perl_dump_packsubs(pTHX_ const HV* stash) + __attribute__nonnull__(pTHX_1); + PERL_CALLCONV void Perl_dump_sub(pTHX_ const GV* gv) __attribute__nonnull__(pTHX_1); @@ -540,10 +546,21 @@ PERL_CALLCONV GV* Perl_gv_fetchmeth(pTHX_ HV* stash, const char* name, STRLEN le PERL_CALLCONV GV* Perl_gv_fetchmeth_autoload(pTHX_ HV* stash, const char* name, STRLEN len, I32 level); PERL_CALLCONV GV* Perl_gv_fetchmethod(pTHX_ HV* stash, const char* name); PERL_CALLCONV GV* Perl_gv_fetchmethod_autoload(pTHX_ HV* stash, const char* name, I32 autoload); -PERL_CALLCONV GV* Perl_gv_fetchpv(pTHX_ const char* name, I32 add, I32 sv_type); -PERL_CALLCONV void Perl_gv_fullname(pTHX_ SV* sv, const GV* gv); -/* PERL_CALLCONV void Perl_gv_fullname3(pTHX_ SV* sv, const GV* gv, const char* prefix); */ -PERL_CALLCONV void Perl_gv_fullname4(pTHX_ SV* sv, const GV* gv, const char* prefix, bool keepmain); +PERL_CALLCONV GV* Perl_gv_fetchpv(pTHX_ const char* name, I32 add, I32 sv_type) + __attribute__nonnull__(pTHX_1); + +PERL_CALLCONV void Perl_gv_fullname(pTHX_ SV* sv, const GV* gv) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); + +/* PERL_CALLCONV void Perl_gv_fullname3(pTHX_ SV* sv, const GV* gv, const char* prefix) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); */ + +PERL_CALLCONV void Perl_gv_fullname4(pTHX_ SV* sv, const GV* gv, const char* prefix, bool keepmain) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); + PERL_CALLCONV void Perl_gv_init(pTHX_ GV* gv, HV* stash, const char* name, STRLEN len, int multi) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_3); @@ -985,19 +1002,41 @@ PERL_CALLCONV SV* Perl_vmess(pTHX_ const char* pat, va_list* args) PERL_CALLCONV void Perl_qerror(pTHX_ SV* err); PERL_CALLCONV void Perl_sortsv(pTHX_ SV ** array, size_t num_elts, SVCOMPARE_t cmp); -PERL_CALLCONV int Perl_mg_clear(pTHX_ SV* sv); -PERL_CALLCONV int Perl_mg_copy(pTHX_ SV* sv, SV* nsv, const char* key, I32 klen); -PERL_CALLCONV void Perl_mg_localize(pTHX_ SV* sv, SV* nsv); +PERL_CALLCONV int Perl_mg_clear(pTHX_ SV* sv) + __attribute__nonnull__(pTHX_1); + +PERL_CALLCONV int Perl_mg_copy(pTHX_ SV* sv, SV* nsv, const char* key, I32 klen) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); + +PERL_CALLCONV void Perl_mg_localize(pTHX_ SV* sv, SV* nsv) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); + PERL_CALLCONV MAGIC* Perl_mg_find(pTHX_ const SV* sv, int type) __attribute__warn_unused_result__; -PERL_CALLCONV int Perl_mg_free(pTHX_ SV* sv); -PERL_CALLCONV int Perl_mg_get(pTHX_ SV* sv); -PERL_CALLCONV U32 Perl_mg_length(pTHX_ SV* sv); -PERL_CALLCONV void Perl_mg_magical(pTHX_ SV* sv); -PERL_CALLCONV int Perl_mg_set(pTHX_ SV* sv); -PERL_CALLCONV I32 Perl_mg_size(pTHX_ SV* sv); -PERL_CALLCONV void Perl_mini_mktime(pTHX_ struct tm *pm); +PERL_CALLCONV int Perl_mg_free(pTHX_ SV* sv) + __attribute__nonnull__(pTHX_1); + +PERL_CALLCONV int Perl_mg_get(pTHX_ SV* sv) + __attribute__nonnull__(pTHX_1); + +PERL_CALLCONV U32 Perl_mg_length(pTHX_ SV* sv) + __attribute__nonnull__(pTHX_1); + +PERL_CALLCONV void Perl_mg_magical(pTHX_ SV* sv) + __attribute__nonnull__(pTHX_1); + +PERL_CALLCONV int Perl_mg_set(pTHX_ SV* sv) + __attribute__nonnull__(pTHX_1); + +PERL_CALLCONV I32 Perl_mg_size(pTHX_ SV* sv) + __attribute__nonnull__(pTHX_1); + +PERL_CALLCONV void Perl_mini_mktime(pTHX_ struct tm *pm) + __attribute__nonnull__(pTHX_1); + 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); @@ -1083,9 +1122,7 @@ PERL_CALLCONV OP* Perl_newCONDOP(pTHX_ I32 flags, OP* first, OP* trueop, OP* fal __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_2); -PERL_CALLCONV CV* Perl_newCONSTSUB(pTHX_ HV* stash, const char* name, SV* sv) - __attribute__nonnull__(pTHX_2); - +PERL_CALLCONV CV* Perl_newCONSTSUB(pTHX_ HV* stash, const char* name, SV* sv); PERL_CALLCONV void Perl_newFORM(pTHX_ I32 floor, OP* o, OP* block); PERL_CALLCONV OP* Perl_newFOROP(pTHX_ I32 flags, char* label, line_t forline, OP* sclr, OP* expr, OP*block, OP*cont) __attribute__malloc__ @@ -1129,6 +1166,7 @@ PERL_CALLCONV OP* Perl_newSTATEOP(pTHX_ I32 flags, char* label, OP* o) PERL_CALLCONV CV* Perl_newSUB(pTHX_ I32 floor, OP* o, OP* proto, OP* block); PERL_CALLCONV CV* Perl_newXS(pTHX_ const char* name, XSUBADDR_t f, const char* filename) __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); PERL_CALLCONV AV* Perl_newAV(pTHX) @@ -1441,7 +1479,9 @@ PERL_CALLCONV char* Perl_rninstr(pTHX_ const char* big, const char* bigend, cons PERL_CALLCONV Sighandler_t Perl_rsignal(pTHX_ int i, Sighandler_t t); PERL_CALLCONV int Perl_rsignal_restore(pTHX_ int i, Sigsave_t* t); -PERL_CALLCONV int Perl_rsignal_save(pTHX_ int i, Sighandler_t t1, Sigsave_t* t2); +PERL_CALLCONV int Perl_rsignal_save(pTHX_ int i, Sighandler_t t1, Sigsave_t* t2) + __attribute__nonnull__(pTHX_3); + PERL_CALLCONV Sighandler_t Perl_rsignal_state(pTHX_ int i); PERL_CALLCONV void Perl_rxres_free(pTHX_ void** rsp) __attribute__nonnull__(pTHX_1); @@ -1481,28 +1521,52 @@ PERL_CALLCONV char* Perl_savesvpv(pTHX_ SV* sv) PERL_CALLCONV void Perl_savestack_grow(pTHX); PERL_CALLCONV void Perl_savestack_grow_cnt(pTHX_ I32 need); -PERL_CALLCONV void Perl_save_aelem(pTHX_ const AV* av, I32 idx, SV **sptr); +PERL_CALLCONV void Perl_save_aelem(pTHX_ const AV* av, I32 idx, SV **sptr) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_3); + PERL_CALLCONV I32 Perl_save_alloc(pTHX_ I32 size, I32 pad); -PERL_CALLCONV void Perl_save_aptr(pTHX_ AV** aptr); -PERL_CALLCONV AV* Perl_save_ary(pTHX_ GV* gv); -PERL_CALLCONV void Perl_save_bool(pTHX_ bool* boolp); -PERL_CALLCONV void Perl_save_clearsv(pTHX_ SV** svp); -PERL_CALLCONV void Perl_save_delete(pTHX_ HV* hv, char* key, I32 klen); +PERL_CALLCONV void Perl_save_aptr(pTHX_ AV** aptr) + __attribute__nonnull__(pTHX_1); + +PERL_CALLCONV AV* Perl_save_ary(pTHX_ GV* gv) + __attribute__nonnull__(pTHX_1); + +PERL_CALLCONV void Perl_save_bool(pTHX_ bool* boolp) + __attribute__nonnull__(pTHX_1); + +PERL_CALLCONV void Perl_save_clearsv(pTHX_ SV** svp) + __attribute__nonnull__(pTHX_1); + +PERL_CALLCONV void Perl_save_delete(pTHX_ HV* hv, char* key, I32 klen) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); + PERL_CALLCONV void Perl_save_destructor(pTHX_ DESTRUCTORFUNC_NOCONTEXT_t f, void* p); PERL_CALLCONV void Perl_save_destructor_x(pTHX_ DESTRUCTORFUNC_t f, void* p); PERL_CALLCONV void Perl_save_freesv(pTHX_ SV* sv); PERL_CALLCONV void Perl_save_freeop(pTHX_ OP* o); PERL_CALLCONV void Perl_save_freepv(pTHX_ char* pv); -PERL_CALLCONV void Perl_save_generic_svref(pTHX_ SV** sptr); -PERL_CALLCONV void Perl_save_generic_pvref(pTHX_ char** str); -PERL_CALLCONV void Perl_save_shared_pvref(pTHX_ char** str); +PERL_CALLCONV void Perl_save_generic_svref(pTHX_ SV** sptr) + __attribute__nonnull__(pTHX_1); + +PERL_CALLCONV void Perl_save_generic_pvref(pTHX_ char** str) + __attribute__nonnull__(pTHX_1); + +PERL_CALLCONV void Perl_save_shared_pvref(pTHX_ char** str) + __attribute__nonnull__(pTHX_1); + PERL_CALLCONV void Perl_save_gp(pTHX_ GV* gv, I32 empty) __attribute__nonnull__(pTHX_1); PERL_CALLCONV HV* Perl_save_hash(pTHX_ GV* gv) __attribute__nonnull__(pTHX_1); -PERL_CALLCONV void Perl_save_helem(pTHX_ HV* hv, SV *key, SV **sptr); +PERL_CALLCONV void Perl_save_helem(pTHX_ HV* hv, SV *key, SV **sptr) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2) + __attribute__nonnull__(pTHX_3); + PERL_CALLCONV void Perl_save_hints(pTHX) __attribute__noreturn__; @@ -1921,9 +1985,10 @@ PERL_CALLCONV void Perl_taint_env(pTHX); PERL_CALLCONV void Perl_taint_proper(pTHX_ const char* f, const char* s) __attribute__nonnull__(pTHX_2); -PERL_CALLCONV UV Perl_to_utf8_case(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp, SV **swash, const char *normal, const char *special) +PERL_CALLCONV UV Perl_to_utf8_case(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp, SV **swashp, const char *normal, const char *special) __attribute__nonnull__(pTHX_1) - __attribute__nonnull__(pTHX_2); + __attribute__nonnull__(pTHX_2) + __attribute__nonnull__(pTHX_4); PERL_CALLCONV UV Perl_to_utf8_lower(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp) __attribute__nonnull__(pTHX_1) @@ -3012,8 +3077,7 @@ STATIC I32 S_study_chunk(pTHX_ struct RExC_state_t* pRExC_state, regnode **scanp __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3) - __attribute__nonnull__(pTHX_4) - __attribute__nonnull__(pTHX_5); + __attribute__nonnull__(pTHX_4); STATIC I32 S_add_data(pTHX_ struct RExC_state_t*, I32 n, const char *s) __attribute__nonnull__(pTHX_1) diff --git a/regcomp.c b/regcomp.c index bb63661..a4e2cc4 100644 --- a/regcomp.c +++ b/regcomp.c @@ -1540,7 +1540,8 @@ S_make_trie(pTHX_ RExC_state_t *pRExC_state, regnode *startbranch, regnode *firs STATIC I32 -S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp, I32 *deltap, regnode *last, scan_data_t *data, U32 flags, U32 depth) +S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp, I32 *deltap, + regnode *last, scan_data_t *data, U32 flags, U32 depth) /* scanp: Start here (read-write). */ /* deltap: Write maxlen-minlen here. */ /* last: Stop before this one. */ @@ -2001,7 +2002,7 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp, I32 *deltap, reg } sv_catpvn(data->last_found, STRING(scan), STR_LEN(scan)); { - SV * sv = data->last_found; + SV * const sv = data->last_found; MAGIC * const mg = SvUTF8(sv) && SvMAGICAL(sv) ? mg_find(sv, PERL_MAGIC_utf8) : NULL; if (mg && mg->mg_len >= 0) diff --git a/utf8.c b/utf8.c index be32870..2a88a45 100644 --- a/utf8.c +++ b/utf8.c @@ -1451,7 +1451,8 @@ The "normal" is a string like "ToLower" which means the swash =cut */ UV -Perl_to_utf8_case(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp, SV **swashp, const char *normal, const char *special) +Perl_to_utf8_case(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp, + SV **swashp, const char *normal, const char *special) { U8 tmpbuf[UTF8_MAXBYTES_CASE+1]; STRLEN len = 0; @@ -1625,7 +1626,7 @@ Perl_swash_init(pTHX_ const char* pkg, const char* name, SV *listsv, I32 minbits { dVAR; SV* retval; - SV* tokenbufsv = sv_newmortal(); + SV* const tokenbufsv = sv_newmortal(); dSP; const size_t pkg_len = strlen(pkg); const size_t name_len = strlen(name);