sR |I32 |dopoptowhen |I32 startingblock
s |void |save_lines |NULLOK AV *array|NN SV *sv
sR |OP* |doeval |int gimme|NULLOK OP** startop|NULLOK CV* outside|U32 seq
-sR |PerlIO *|check_type_and_open|NN const char *name|NN const char *mode
+sRn |PerlIO *|check_type_and_open|NN const char *name|NN const char *mode
sR |PerlIO *|doopen_pm |NN const char *name|NN const char *mode
sRn |bool |path_is_absolute|NN const char *name
sR |I32 |run_user_filter|int idx|NN SV *buf_sv|int maxlen
#define dopoptowhen(a) S_dopoptowhen(aTHX_ a)
#define save_lines(a,b) S_save_lines(aTHX_ a,b)
#define doeval(a,b,c,d) S_doeval(aTHX_ a,b,c,d)
-#define check_type_and_open(a,b) S_check_type_and_open(aTHX_ a,b)
+#define check_type_and_open S_check_type_and_open
#define doopen_pm(a,b) S_doopen_pm(aTHX_ a,b)
#define path_is_absolute S_path_is_absolute
#define run_user_filter(a,b,c) S_run_user_filter(aTHX_ a,b,c)
}
STATIC PerlIO *
-S_check_type_and_open(pTHX_ const char *name, const char *mode)
+S_check_type_and_open(const char *name, const char *mode)
{
Stat_t st;
const int st_rc = PerlLIO_stat(name, &st);
+
if (st_rc < 0 || S_ISDIR(st.st_mode) || S_ISBLK(st.st_mode)) {
return NULL;
}
{
namesv = newSV(0);
for (i = 0; i <= AvFILL(ar); i++) {
- SV *dirsv = *av_fetch(ar, i, TRUE);
+ SV * const dirsv = *av_fetch(ar, i, TRUE);
if (SvROK(dirsv)) {
int count;
}
if (SvTYPE(arg) == SVt_PVGV) {
- IO *io = GvIO((GV *)arg);
+ IO * const io = GvIO((GV *)arg);
++filter_has_file;
PP(pp_entertry)
{
dVAR;
- PERL_CONTEXT *cx = create_eval_scope(0);
+ PERL_CONTEXT * const cx = create_eval_scope(0);
cx->blk_eval.retop = cLOGOP->op_other->op_next;
return DOCATCH(PL_op->op_next);
}
if (c == 0)
PUSHs(&PL_sv_no);
else if (SvTEMP(TOPs))
- SvREFCNT_inc(TOPs);
+ SvREFCNT_inc_void(TOPs);
FREETMPS;
LEAVE;
RETURN;
if (c == 0)
PUSHs(&PL_sv_undef);
else if (SvTEMP(TOPs))
- SvREFCNT_inc(TOPs);
+ SvREFCNT_inc_void(TOPs);
if (SM_OTHER_REF(PVCV)) {
/* This one has to be null-proto'd too.
if (c == 0)
PUSHs(&PL_sv_undef);
else if (SvTEMP(TOPs))
- SvREFCNT_inc(TOPs);
+ SvREFCNT_inc_void(TOPs);
FREETMPS;
LEAVE;
PUTBACK;
STATIC OP* S_doeval(pTHX_ int gimme, OP** startop, CV* outside, U32 seq)
__attribute__warn_unused_result__;
-STATIC PerlIO * S_check_type_and_open(pTHX_ const char *name, const char *mode)
+STATIC PerlIO * S_check_type_and_open(const char *name, const char *mode)
__attribute__warn_unused_result__
- __attribute__nonnull__(pTHX_1)
- __attribute__nonnull__(pTHX_2);
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
STATIC PerlIO * S_doopen_pm(pTHX_ const char *name, const char *mode)
__attribute__warn_unused_result__