#endif
Uid_t fileuid;
Gid_t filegid;
- IO *io = GvIOp(gv);
+ IO * const io = GvIOp(gv);
if (!PL_argvoutgv)
PL_argvoutgv = gv_fetchpv("ARGVOUT",TRUE,SVt_PVIO);
continue;
}
if (*PL_inplace) {
- char *star = strchr(PL_inplace, '*');
+ const char *star = strchr(PL_inplace, '*');
if (star) {
- char *begin = PL_inplace;
+ const char *begin = PL_inplace;
sv_setpvn(sv, "", 0);
do {
sv_catpvn(sv, begin, star - begin);
Perl_start_glob (pTHX_ SV *tmpglob, IO *io)
{
dVAR;
- SV *tmpcmd = NEWSV(55, 0);
+ SV * const tmpcmd = NEWSV(55, 0);
PerlIO *fp;
ENTER;
SAVEFREESV(tmpcmd);
|NN SV* littlesv|U32 flags
p |char* |find_script |const char *scriptname|bool dosearch \
|const char **search_ext|I32 flags
-p |OP* |force_list |NN OP* arg
+p |OP* |force_list |NULLOK OP* arg
p |OP* |fold_constants |NN OP* arg
Afpd |char* |form |NN const char* pat|...
Ap |char* |vform |NN const char* pat|NULLOK va_list* args
Apd |HE* |hv_store_ent |HV* tb|SV* key|SV* val|U32 hash
ApM |SV** |hv_store_flags |HV* tb|const char* key|I32 klen|SV* val \
|U32 hash|int flags
-Apd |void |hv_undef |HV* tb
+Apd |void |hv_undef |NULLOK HV* tb
ApP |I32 |ibcmp |NN const char* a|NN const char* b|I32 len
ApP |I32 |ibcmp_locale |NN const char* a|NN const char* b|I32 len
Apd |I32 |ibcmp_utf8 |NN const char* a|char **pe1|UV l1|bool u1|NN const char* b|char **pe2|UV l2|bool u2
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
-pR |OP* |invert |OP* cmd
+pR |OP* |invert |NULLOK OP* cmd
dpR |bool |is_gv_magical |NN const char *name|STRLEN len|U32 flags
ApR |I32 |is_lvalue_sub
ApPR |U32 |to_uni_upper_lc|U32 c
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
+ |NULLOK OP* sv|OP* expr|OP*block|OP*cont
Apa |OP* |newLOGOP |I32 optype|I32 flags|OP* left|OP* right
Apa |OP* |newLOOPEX |I32 type|OP* label
Apa |OP* |newLOOPOP |I32 flags|I32 debuggable|OP* expr|OP* block
Apa |OP* |newOP |I32 optype|I32 flags
Ap |void |newPROG |NN OP* o
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
+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
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* |newCVREF |I32 flags|OP* o
-Apa |OP* |newGVOP |I32 type|I32 flags|GV* gv
+Apa |OP* |newCVREF |I32 flags|NULLOK OP* o
+Apa |OP* |newGVOP |I32 type|I32 flags|NN GV* gv
Apa |GV* |newGVgen |const char* pack
Apa |OP* |newGVREF |I32 type|OP* o
ApaR |OP* |newHVREF |NN OP* o
Apda |SV* |newSVpv |const char* s|STRLEN len
Apda |SV* |newSVpvn |const char* s|STRLEN len
Apda |SV* |newSVhek |const HEK *hek
-Apda |SV* |newSVpvn_share |const char* s|I32 len|U32 hash
+Apda |SV* |newSVpvn_share |NULLOK const char* s|I32 len|U32 hash
Afpda |SV* |newSVpvf |NN const char* pat|...
Apa |SV* |vnewSVpvf |NN const char* pat|NULLOK va_list* args
Apda |SV* |newSVrv |NN SV* rv|NULLOK const char* classname
Apda |SV* |newSVsv |NULLOK SV* old
-Apa |OP* |newUNOP |I32 type|I32 flags|OP* first
-Apa |OP* |newWHILEOP |I32 flags|I32 debuggable|LOOP* loop \
- |I32 whileline|OP* expr|OP* block|OP* cont \
+Apa |OP* |newUNOP |I32 type|I32 flags|NULLOK OP* first
+Apa |OP* |newWHILEOP |I32 flags|I32 debuggable|NULLOK LOOP* loop \
+ |I32 whileline|NULLOK OP* expr|NULLOK OP* block|NULLOK OP* cont \
|I32 has_my
Apa |PERL_SI*|new_stackinfo|I32 stitems|I32 cxitems
Ap |char* |scan_vstring |NN const char *vstr|NN SV *sv
Apd |const char* |scan_version |NN const char *vstr|NN SV *sv|bool qv
-Apd |SV* |new_version |SV *ver
-Apd |SV* |upg_version |SV *ver
-Apd |SV* |vnumify |SV *vs
-Apd |SV* |vnormal |SV *vs
-Apd |SV* |vstringify |SV *vs
+Apd |SV* |new_version |NN SV *ver
+Apd |SV* |upg_version |NN SV *ver
+Apd |SV* |vnumify |NN SV *vs
+Apd |SV* |vnormal |NN SV *vs
+Apd |SV* |vstringify |NN SV *vs
Apd |int |vcmp |NN SV *lvs|NN SV *rvs
-p |PerlIO*|nextargv |GV* gv
-ApP |char* |ninstr |const char* big|const char* bigend \
- |const char* little|const char* lend
-pr |OP* |oopsCV |OP* o
-Ap |void |op_free |OP* arg
-p |void |package |OP* o
+p |PerlIO*|nextargv |NN GV* gv
+ApP |char* |ninstr |NN const char* big|NN const char* bigend \
+ |NN const char* little|NN const char* lend
+pr |OP* |oopsCV |NN OP* o
+Ap |void |op_free |NN OP* arg
+p |void |package |NN OP* o
pd |PADOFFSET|pad_alloc |I32 optype|U32 tmptype
p |PADOFFSET|allocmy |NN char* name
pdR |PADOFFSET|pad_findmy |NN const char* name
pd |void |pad_free |PADOFFSET po
pd |void |pad_reset
pd |void |pad_swipe |PADOFFSET po|bool refadjust
-p |void |peep |OP* o
-dopM |PerlIO*|start_glob |SV* pattern|IO *io
+p |void |peep |NULLOK OP* o
+dopM |PerlIO*|start_glob |NN SV* pattern|NN IO *io
#if defined(USE_REENTRANT_API)
Ap |void |reentrant_size
Ap |void |reentrant_init
Ap |void |set_numeric_radix
Ap |void |set_numeric_standard
Apd |void |require_pv |NN const char* pv
-Apd |void |pack_cat |SV *cat|const char *pat|const char *patend|SV **beglist|SV **endlist|SV ***next_in_list|U32 flags
-Apd |void |packlist |SV *cat|const char *pat|const char *patend|SV **beglist|SV **endlist
+Apd |void |pack_cat |NN SV *cat|NN const char *pat|NN const char *patend \
+ |NN SV **beglist|NN SV **endlist|NN SV ***next_in_list|U32 flags
+Apd |void |packlist |NN SV *cat|NN const char *pat|NN const char *patend|NN SV **beglist|NN SV **endlist
p |void |pidgone |Pid_t pid|int status
Ap |void |pmflag |NN U32* pmfl|int ch
p |OP* |pmruntime |NN OP* pm|NN OP* expr|bool isreg
-p |OP* |pmtrans |NN OP* o|NN OP* expr|OP* repl
+p |OP* |pmtrans |NN OP* o|NN OP* expr|NN OP* repl
Ap |void |pop_scope
-p |OP* |prepend_elem |I32 optype|OP* head|OP* tail
+p |OP* |prepend_elem |I32 optype|NULLOK OP* head|NULLOK OP* tail
Ap |void |push_scope
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 |SV* |regclass_swash |NN const struct regnode *n|bool doinit|NULLOK SV **listsvp|NULLOK 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 |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 \
- |struct re_scream_pos_data_s *data
-Ap |SV* |re_intuit_string|regexp* prog
+Ap |char* |re_intuit_start|NN regexp* prog|NULLOK SV* sv|NN char* strpos \
+ |NN char* strend|U32 flags \
+ |NULLOK struct re_scream_pos_data_s *data
+Ap |SV* |re_intuit_string|NN regexp* prog
Ap |I32 |regexec_flags |NN regexp* prog|NN char* stringarg \
|NN char* strend|NN char* strbeg|I32 minend \
|SV* screamer|void* data|U32 flags
ApR |regnode*|regnext |NN regnode* p
-Ep |void |regprop |SV* sv|const regnode* o
+Ep |void |regprop |NN SV* sv|NN const regnode* o
Ap |void |repeatcpy |NN char* to|NN const char* from|I32 len|I32 count
ApP |char* |rninstr |NN const char* big|NN const char* bigend \
|NN const char* little|NN const char* lend
Apd |int |sv_isobject |NULLOK SV* sv
Apd |STRLEN |sv_len |NULLOK SV* sv
Apd |STRLEN |sv_len_utf8 |NULLOK SV* sv
-Apd |void |sv_magic |NN SV* sv|NULLOK SV* obj|int how|const char* name \
+Apd |void |sv_magic |NN SV* sv|NULLOK SV* obj|int how|NULLOK const char* name \
|I32 namlen
Apd |MAGIC *|sv_magicext |NN SV* sv|NULLOK SV* obj|int how|const MGVTBL *vtbl \
- |const char* name|I32 namlen
+ |NULLOK const char* name|I32 namlen
ApdaR |SV* |sv_mortalcopy |NULLOK SV* oldsv
ApdR |SV* |sv_newmortal
Apd |SV* |sv_newref |NULLOK SV* sv
Apd |void |sv_upgrade |NN SV* sv|U32 mt
Apd |void |sv_usepvn |NN SV* sv|NULLOK char* ptr|STRLEN len
Apd |void |sv_vcatpvfn |NN SV* sv|NN const char* pat|STRLEN patlen \
- |NULLOK va_list* args|SV** svargs|I32 svmax \
+ |NULLOK va_list* args|NULLOK SV** svargs|I32 svmax \
|NULLOK bool *maybe_tainted
Apd |void |sv_vsetpvfn |NN SV* sv|NN const char* pat|STRLEN patlen \
- |NULLOK va_list* args|SV** svargs|I32 svmax \
+ |NULLOK va_list* args|NULLOK SV** svargs|I32 svmax \
|NULLOK bool *maybe_tainted
ApR |NV |str_to_version |NN SV *sv
Ap |SV* |swash_init |NN const char* pkg|NN const char* name|NN SV* listsv|I32 minbits|I32 none
Ap |int |runops_standard
Ap |int |runops_debug
Afpd |void |sv_catpvf_mg |NN SV *sv|NN const char* pat|...
-Apd |void |sv_vcatpvf_mg |NN SV* sv|NN const char* pat|va_list* args
+Apd |void |sv_vcatpvf_mg |NN SV* sv|NN const char* pat|NULLOK va_list* args
Apd |void |sv_catpv_mg |NN SV *sv|NN const char *ptr
Apd |void |sv_catpvn_mg |NN SV *sv|NN const char *ptr|STRLEN len
Apd |void |sv_catsv_mg |NN SV *dstr|NULLOK SV *sstr
s |int |ao |int toketype
s |void |depcom
s |const char*|incl_perldb
-#if 0
-s |I32 |utf16_textfilter|int idx|SV *sv|int maxlen
-s |I32 |utf16rev_textfilter|int idx|SV *sv|int maxlen
-#endif
# if defined(PERL_CR_FILTER)
s |I32 |cr_textfilter |int idx|NULLOK SV *sv|int maxlen
# endif
#define depcom S_depcom
#define incl_perldb S_incl_perldb
#endif
-#if 0
-#ifdef PERL_CORE
-#define utf16_textfilter S_utf16_textfilter
-#define utf16rev_textfilter S_utf16rev_textfilter
-#endif
-#endif
# if defined(PERL_CR_FILTER)
#ifdef PERL_CORE
#define cr_textfilter S_cr_textfilter
#define depcom() S_depcom(aTHX)
#define incl_perldb() S_incl_perldb(aTHX)
#endif
-#if 0
-#ifdef PERL_CORE
-#define utf16_textfilter(a,b,c) S_utf16_textfilter(aTHX_ a,b,c)
-#define utf16rev_textfilter(a,b,c) S_utf16rev_textfilter(aTHX_ a,b,c)
-#endif
-#endif
# if defined(PERL_CR_FILTER)
#ifdef PERL_CORE
#define cr_textfilter(a,b,c) S_cr_textfilter(aTHX_ a,b,c)
OP *
Perl_pmtrans(pTHX_ OP *o, OP *expr, OP *repl)
{
- SV *tstr = ((SVOP*)expr)->op_sv;
- SV *rstr = ((SVOP*)repl)->op_sv;
+ SV * const tstr = ((SVOP*)expr)->op_sv;
+ SV * const rstr = ((SVOP*)repl)->op_sv;
STRLEN tlen;
STRLEN rlen;
const U8 *t = (U8*)SvPV_const(tstr, tlen);
CopSTASH_set(cop, PL_curstash);
if (PERLDB_LINE && PL_curstash != PL_debstash) {
- SV **svp = av_fetch(CopFILEAV(PL_curcop), (I32)CopLINE(cop), FALSE);
- if (svp && *svp != &PL_sv_undef ) {
- (void)SvIOK_on(*svp);
+ SV ** const svp = av_fetch(CopFILEAV(PL_curcop), (I32)CopLINE(cop), FALSE);
+ if (svp && *svp != &PL_sv_undef ) {
+ (void)SvIOK_on(*svp);
SvIV_set(*svp, PTR2IV(cop));
}
}
PERL_UNUSED_ARG(debuggable);
- if (expr && (expr->op_type == OP_READLINE || expr->op_type == OP_GLOB
- || (expr->op_type == OP_NULL && expr->op_targ == OP_GLOB))) {
- expr = newUNOP(OP_DEFINED, 0,
- newASSIGNOP(0, newDEFSVOP(), 0, expr) );
- } else if (expr && (expr->op_flags & OPf_KIDS)) {
- const OP * const k1 = ((UNOP*)expr)->op_first;
- const OP * const k2 = (k1) ? k1->op_sibling : NULL;
- switch (expr->op_type) {
- case OP_NULL:
- if (k2 && k2->op_type == OP_READLINE
- && (k2->op_flags & OPf_STACKED)
- && ((k1->op_flags & OPf_WANT) == OPf_WANT_SCALAR))
- expr = newUNOP(OP_DEFINED, 0, expr);
- break;
+ if (expr) {
+ if (expr->op_type == OP_READLINE || expr->op_type == OP_GLOB
+ || (expr->op_type == OP_NULL && expr->op_targ == OP_GLOB)) {
+ expr = newUNOP(OP_DEFINED, 0,
+ newASSIGNOP(0, newDEFSVOP(), 0, expr) );
+ } else if (expr->op_flags & OPf_KIDS) {
+ const OP * const k1 = ((UNOP*)expr)->op_first;
+ const OP * const k2 = (k1) ? k1->op_sibling : NULL;
+ switch (expr->op_type) {
+ case OP_NULL:
+ if (k2 && k2->op_type == OP_READLINE
+ && (k2->op_flags & OPf_STACKED)
+ && ((k1->op_flags & OPf_WANT) == OPf_WANT_SCALAR))
+ expr = newUNOP(OP_DEFINED, 0, expr);
+ break;
- case OP_SASSIGN:
- if (k1->op_type == OP_READDIR
- || k1->op_type == OP_GLOB
- || (k1->op_type == OP_NULL && k1->op_targ == OP_GLOB)
- || k1->op_type == OP_EACH)
- expr = newUNOP(OP_DEFINED, 0, expr);
- break;
+ case OP_SASSIGN:
+ if (k1->op_type == OP_READDIR
+ || k1->op_type == OP_GLOB
+ || (k1->op_type == OP_NULL && k1->op_targ == OP_GLOB)
+ || k1->op_type == OP_EACH)
+ expr = newUNOP(OP_DEFINED, 0, expr);
+ break;
+ }
}
}
Perl_cv_ckproto(pTHX_ const CV *cv, const GV *gv, const char *p)
{
if (((!p != !SvPOK(cv)) || (p && strNE(p, SvPVX_const(cv)))) && ckWARN_d(WARN_PROTOTYPE)) {
- SV* msg = sv_newmortal();
+ SV* const msg = sv_newmortal();
SV* name = Nullsv;
if (gv)
if (message) {
if (PL_in_eval & EVAL_KEEPERR) {
static const char prefix[] = "\t(in cleanup) ";
- SV *err = ERRSV;
+ SV * const err = ERRSV;
const char *e = Nullch;
if (!SvPOK(err))
sv_setpvn(err,"",0);
__attribute__nonnull__(pTHX_3);
PERL_CALLCONV char* Perl_find_script(pTHX_ const char *scriptname, bool dosearch, const char **search_ext, I32 flags);
-PERL_CALLCONV OP* Perl_force_list(pTHX_ OP* arg)
- __attribute__nonnull__(pTHX_1);
-
+PERL_CALLCONV OP* Perl_force_list(pTHX_ OP* arg);
PERL_CALLCONV OP* Perl_fold_constants(pTHX_ OP* arg)
__attribute__nonnull__(pTHX_1);
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)
+PERL_CALLCONV OP* Perl_newFOROP(pTHX_ I32 flags, char* label, line_t forline, OP* sv, OP* expr, OP*block, OP*cont)
__attribute__malloc__
__attribute__warn_unused_result__;
PERL_CALLCONV OP* Perl_newGVOP(pTHX_ I32 type, I32 flags, GV* gv)
__attribute__malloc__
- __attribute__warn_unused_result__;
+ __attribute__warn_unused_result__
+ __attribute__nonnull__(pTHX_3);
PERL_CALLCONV GV* Perl_newGVgen(pTHX_ const char* pack)
__attribute__malloc__
__attribute__nonnull__(pTHX_1)
__attribute__nonnull__(pTHX_2);
-PERL_CALLCONV SV* Perl_new_version(pTHX_ SV *ver);
-PERL_CALLCONV SV* Perl_upg_version(pTHX_ SV *ver);
-PERL_CALLCONV SV* Perl_vnumify(pTHX_ SV *vs);
-PERL_CALLCONV SV* Perl_vnormal(pTHX_ SV *vs);
-PERL_CALLCONV SV* Perl_vstringify(pTHX_ SV *vs);
+PERL_CALLCONV SV* Perl_new_version(pTHX_ SV *ver)
+ __attribute__nonnull__(pTHX_1);
+
+PERL_CALLCONV SV* Perl_upg_version(pTHX_ SV *ver)
+ __attribute__nonnull__(pTHX_1);
+
+PERL_CALLCONV SV* Perl_vnumify(pTHX_ SV *vs)
+ __attribute__nonnull__(pTHX_1);
+
+PERL_CALLCONV SV* Perl_vnormal(pTHX_ SV *vs)
+ __attribute__nonnull__(pTHX_1);
+
+PERL_CALLCONV SV* Perl_vstringify(pTHX_ SV *vs)
+ __attribute__nonnull__(pTHX_1);
+
PERL_CALLCONV int Perl_vcmp(pTHX_ SV *lvs, SV *rvs)
__attribute__nonnull__(pTHX_1)
__attribute__nonnull__(pTHX_2);
-PERL_CALLCONV PerlIO* Perl_nextargv(pTHX_ GV* gv);
+PERL_CALLCONV PerlIO* Perl_nextargv(pTHX_ GV* gv)
+ __attribute__nonnull__(pTHX_1);
+
PERL_CALLCONV char* Perl_ninstr(pTHX_ const char* big, const char* bigend, const char* little, const char* lend)
- __attribute__pure__;
+ __attribute__pure__
+ __attribute__nonnull__(pTHX_1)
+ __attribute__nonnull__(pTHX_2)
+ __attribute__nonnull__(pTHX_3)
+ __attribute__nonnull__(pTHX_4);
PERL_CALLCONV OP* Perl_oopsCV(pTHX_ OP* o)
- __attribute__noreturn__;
+ __attribute__noreturn__
+ __attribute__nonnull__(pTHX_1);
+
+PERL_CALLCONV void Perl_op_free(pTHX_ OP* arg)
+ __attribute__nonnull__(pTHX_1);
+
+PERL_CALLCONV void Perl_package(pTHX_ OP* o)
+ __attribute__nonnull__(pTHX_1);
-PERL_CALLCONV void Perl_op_free(pTHX_ OP* arg);
-PERL_CALLCONV void Perl_package(pTHX_ OP* o);
PERL_CALLCONV PADOFFSET Perl_pad_alloc(pTHX_ I32 optype, U32 tmptype);
PERL_CALLCONV PADOFFSET Perl_allocmy(pTHX_ char* name)
__attribute__nonnull__(pTHX_1);
PERL_CALLCONV void Perl_pad_reset(pTHX);
PERL_CALLCONV void Perl_pad_swipe(pTHX_ PADOFFSET po, bool refadjust);
PERL_CALLCONV void Perl_peep(pTHX_ OP* o);
-PERL_CALLCONV PerlIO* Perl_start_glob(pTHX_ SV* pattern, IO *io);
+PERL_CALLCONV PerlIO* Perl_start_glob(pTHX_ SV* pattern, IO *io)
+ __attribute__nonnull__(pTHX_1)
+ __attribute__nonnull__(pTHX_2);
+
#if defined(USE_REENTRANT_API)
PERL_CALLCONV void Perl_reentrant_size(pTHX);
PERL_CALLCONV void Perl_reentrant_init(pTHX);
PERL_CALLCONV void Perl_require_pv(pTHX_ const char* pv)
__attribute__nonnull__(pTHX_1);
-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);
-PERL_CALLCONV void Perl_packlist(pTHX_ SV *cat, const char *pat, const char *patend, SV **beglist, SV **endlist);
+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)
+ __attribute__nonnull__(pTHX_2)
+ __attribute__nonnull__(pTHX_3)
+ __attribute__nonnull__(pTHX_4)
+ __attribute__nonnull__(pTHX_5)
+ __attribute__nonnull__(pTHX_6);
+
+PERL_CALLCONV void Perl_packlist(pTHX_ SV *cat, const char *pat, const char *patend, SV **beglist, SV **endlist)
+ __attribute__nonnull__(pTHX_1)
+ __attribute__nonnull__(pTHX_2)
+ __attribute__nonnull__(pTHX_3)
+ __attribute__nonnull__(pTHX_4)
+ __attribute__nonnull__(pTHX_5);
+
PERL_CALLCONV void Perl_pidgone(pTHX_ Pid_t pid, int status);
PERL_CALLCONV void Perl_pmflag(pTHX_ U32* pmfl, int ch)
__attribute__nonnull__(pTHX_1);
PERL_CALLCONV OP* Perl_pmtrans(pTHX_ OP* o, OP* expr, OP* repl)
__attribute__nonnull__(pTHX_1)
- __attribute__nonnull__(pTHX_2);
+ __attribute__nonnull__(pTHX_2)
+ __attribute__nonnull__(pTHX_3);
PERL_CALLCONV void Perl_pop_scope(pTHX);
PERL_CALLCONV OP* Perl_prepend_elem(pTHX_ I32 optype, OP* head, OP* tail);
PERL_CALLCONV void Perl_regdump(pTHX_ regexp* r)
__attribute__nonnull__(pTHX_1);
-PERL_CALLCONV SV* Perl_regclass_swash(pTHX_ const struct regnode *n, bool doinit, SV **listsvp, SV **altsvp);
+PERL_CALLCONV SV* Perl_regclass_swash(pTHX_ const struct regnode *n, bool doinit, SV **listsvp, SV **altsvp)
+ __attribute__nonnull__(pTHX_1);
+
PERL_CALLCONV I32 Perl_pregexec(pTHX_ regexp* prog, char* stringarg, char* strend, char* strbeg, I32 minend, SV* screamer, U32 nosave)
__attribute__nonnull__(pTHX_1)
__attribute__nonnull__(pTHX_2)
__attribute__nonnull__(pTHX_2)
__attribute__nonnull__(pTHX_3);
-PERL_CALLCONV char* Perl_re_intuit_start(pTHX_ regexp* prog, SV* sv, char* strpos, char* strend, U32 flags, struct re_scream_pos_data_s *data);
-PERL_CALLCONV SV* Perl_re_intuit_string(pTHX_ regexp* prog);
+PERL_CALLCONV char* Perl_re_intuit_start(pTHX_ regexp* prog, SV* sv, char* strpos, char* strend, U32 flags, struct re_scream_pos_data_s *data)
+ __attribute__nonnull__(pTHX_1)
+ __attribute__nonnull__(pTHX_3)
+ __attribute__nonnull__(pTHX_4);
+
+PERL_CALLCONV SV* Perl_re_intuit_string(pTHX_ regexp* prog)
+ __attribute__nonnull__(pTHX_1);
+
PERL_CALLCONV I32 Perl_regexec_flags(pTHX_ regexp* prog, char* stringarg, char* strend, char* strbeg, I32 minend, SV* screamer, void* data, U32 flags)
__attribute__nonnull__(pTHX_1)
__attribute__nonnull__(pTHX_2)
__attribute__warn_unused_result__
__attribute__nonnull__(pTHX_1);
-PERL_CALLCONV void Perl_regprop(pTHX_ SV* sv, const regnode* o);
+PERL_CALLCONV void Perl_regprop(pTHX_ SV* sv, const regnode* o)
+ __attribute__nonnull__(pTHX_1)
+ __attribute__nonnull__(pTHX_2);
+
PERL_CALLCONV void Perl_repeatcpy(pTHX_ char* to, const char* from, I32 len, I32 count)
__attribute__nonnull__(pTHX_1)
__attribute__nonnull__(pTHX_2);
STATIC int S_ao(pTHX_ int toketype);
STATIC void S_depcom(pTHX);
STATIC const char* S_incl_perldb(pTHX);
-#if 0
-STATIC I32 S_utf16_textfilter(pTHX_ int idx, SV *sv, int maxlen);
-STATIC I32 S_utf16rev_textfilter(pTHX_ int idx, SV *sv, int maxlen);
-#endif
# if defined(PERL_CR_FILTER)
STATIC I32 S_cr_textfilter(pTHX_ int idx, SV *sv, int maxlen);
# endif
k = PL_regkind[(U8)OP(o)];
if (k == EXACT) {
- SV *dsv = sv_2mortal(newSVpvn("", 0));
+ SV * const dsv = sv_2mortal(newSVpvn("", 0));
/* Using is_utf8_string() is a crude hack but it may
* be the best for now since we have no flag "this EXACTish
* node was UTF-8" --jhi */
const bool do_utf8 = is_utf8_string((U8*)STRING(o), STR_LEN(o));
- const char *s = do_utf8 ?
+ const char * const s = do_utf8 ?
pv_uni_display(dsv, (U8*)STRING(o), STR_LEN(o), 60,
UNI_DISPLAY_REGEX) :
STRING(o);
Perl_sv_catpvf(aTHX_ sv, "[%d]", o->flags); /* 2: embedded, otherwise 1 */
else if (k == ANYOF) {
int i, rangestart = -1;
- U8 flags = ANYOF_FLAGS(o);
+ const U8 flags = ANYOF_FLAGS(o);
const char * const anyofs[] = { /* Should be synchronized with
* ANYOF_ #xdefines in regcomp.h */
"\\w",
{
SV *lv;
- SV *sw = regclass_swash(o, FALSE, &lv, 0);
+ SV * const sw = regclass_swash(o, FALSE, &lv, 0);
if (lv) {
if (sw) {
if (rangestart == -1)
rangestart = i;
} else if (rangestart != -1) {
- U8 *p;
-
if (i <= rangestart + 3)
for (; rangestart < i; rangestart++) {
- U8 *e;
- for(e = uvchr_to_utf8(s, rangestart), p = s; p < e; p++)
+ const U8 * const e = uvchr_to_utf8(s,rangestart);
+ U8 *p;
+ for(p = s; p < e; p++)
put_byte(sv, *p);
}
else {
- U8 *e;
- for (e = uvchr_to_utf8(s, rangestart), p = s; p < e; p++)
+ const U8 *e = uvchr_to_utf8(s,rangestart);
+ U8 *p;
+ for (p = s; p < e; p++)
put_byte(sv, *p);
- sv_catpv(sv, "-");
- for (e = uvchr_to_utf8(s, i - 1), p = s; p < e; p++)
+ sv_catpvn(sv, "-", 1);
+ e = uvchr_to_utf8(s, i-1);
+ for (p = s; p < e; p++)
put_byte(sv, *p);
}
rangestart = -1;
while(*s && *s != '\n') s++;
if (*s == '\n') {
- const char *t = ++s;
+ const char * const t = ++s;
while (*s) {
if (*s == '\n')
GET_RE_DEBUG_FLAGS_DECL;
DEBUG_COMPILE_r(
{
- const char *s = SvPV_nolen_const(prog->check_substr
+ const char * const s = SvPV_nolen_const(prog->check_substr
? prog->check_substr : prog->check_utf8);
if (!PL_colorset) reginitcolors();
if (PL_regdata->what[n] == 's') {
SV * const rv = (SV*)PL_regdata->data[n];
AV * const av = (AV*)SvRV((SV*)rv);
- SV **ary = AvARRAY(av);
+ SV **const ary = AvARRAY(av);
SV **a, **b;
/* See the end of regcomp.c:S_reglass() for
if (patlen == 0)
return;
if (patlen == 2 && pat[0] == '%' && pat[1] == 's') {
- if (args) {
- const char * const s = va_arg(*args, char*);
- sv_catpv(sv, s ? s : nullstr);
- }
- else if (svix < svmax) {
- sv_catsv(sv, *svargs);
- if (DO_UTF8(*svargs))
- SvUTF8_on(sv);
- }
- return;
+ if (args) {
+ const char * const s = va_arg(*args, char*);
+ sv_catpv(sv, s ? s : nullstr);
+ }
+ else if (svix < svmax) {
+ sv_catsv(sv, *svargs);
+ if (DO_UTF8(*svargs))
+ SvUTF8_on(sv);
+ }
+ return;
}
if (args && patlen == 3 && pat[0] == '%' &&
pat[1] == '-' && pat[2] == 'p') {
char *
Perl_vform(pTHX_ const char *pat, va_list *args)
{
- SV *sv = mess_alloc();
+ SV * const sv = mess_alloc();
sv_vsetpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*));
return SvPVX(sv);
}
char *
Perl_my_bcopy(register const char *from,register char *to,register I32 len)
{
- char *retval = to;
+ char * const retval = to;
if (from - to >= 0) {
while (len--)
void *
Perl_my_memset(register char *loc, register I32 ch, register I32 len)
{
- char *retval = loc;
+ char * const retval = loc;
while (len--)
*loc++ = ch;
char *
Perl_my_bzero(register char *loc, register I32 len)
{
- char *retval = loc;
+ char * const retval = loc;
while (len--)
*loc++ = 0;
SV *
Perl_new_version(pTHX_ SV *ver)
{
- SV *rv = newSV(0);
+ SV * const rv = newSV(0);
if ( sv_derived_from(ver,"version") ) /* can just copy directly */
{
I32 key;
}
#ifdef SvVOK
if ( SvVOK(ver) ) { /* already a v-string */
- char *version;
MAGIC* mg = mg_find(ver,PERL_MAGIC_vstring);
const STRLEN len = mg->mg_len;
- version = savepvn( (const char*)mg->mg_ptr, len);
+ char * const version = savepvn( (const char*)mg->mg_ptr, len);
sv_setpvn(rv,version,len);
Safefree(version);
}
}
#ifdef SvVOK
else if ( SvVOK(ver) ) { /* already a v-string */
- MAGIC* mg = mg_find(ver,PERL_MAGIC_vstring);
+ const MAGIC* const mg = mg_find(ver,PERL_MAGIC_vstring);
version = savepvn( (const char*)mg->mg_ptr,mg->mg_len );
qv = 1;
}
{
I32 i, len, digit;
bool alpha = FALSE;
- SV *sv = newSV(0);
+ SV * const sv = newSV(0);
AV *av;
if ( SvROK(vs) )
vs = SvRV(vs);
SV *
Perl_vstringify(pTHX_ SV *vs)
{
- I32 qv = 0;
if ( SvROK(vs) )
vs = SvRV(vs);
-
if ( hv_exists((HV *)vs, "qv", 2) )
- qv = 1;
-
- if ( qv )
return vnormal(vs);
else
return vnumify(vs);