}
nope:
- if (svrecode)
- SvREFCNT_dec(svrecode);
+ SvREFCNT_dec(svrecode);
Safefree(temp_buffer);
return count;
HeSVKEY_set(entry, SvREFCNT_inc_simple_NN(key));
return entry; /* beware, hent_val is not set */
}
- if (HeVAL(entry))
- SvREFCNT_dec(HeVAL(entry));
+ SvREFCNT_dec(HeVAL(entry));
Safefree(HeKEY_hek(entry));
del_HE(entry);
iter->xhv_eiter = NULL; /* HvEITER(hv) = NULL */
if(i)
LEAVE;
#endif
- if(to_dec)
- SvREFCNT_dec(to_dec);
+ SvREFCNT_dec(to_dec);
return 0;
}
#endif /* !PERL_MICRO */
#endif
}
else if (strEQ(mg->mg_ptr+1, "NCODING")) {
- if (PL_encoding)
- SvREFCNT_dec(PL_encoding);
+ SvREFCNT_dec(PL_encoding);
if (SvOK(sv) || SvGMAGICAL(sv)) {
PL_encoding = newSVsv(sv);
}
PL_rs = newSVsv(sv);
break;
case '\\':
- if (PL_ors_sv)
- SvREFCNT_dec(PL_ors_sv);
+ SvREFCNT_dec(PL_ors_sv);
if (SvOK(sv) || SvGMAGICAL(sv)) {
PL_ors_sv = newSVsv(sv);
}
if (--list->refcnt == 0) {
if (list->array) {
IV i;
- for (i = 0; i < list->cur; i++) {
- if (list->array[i].arg)
- SvREFCNT_dec(list->array[i].arg);
- }
+ for (i = 0; i < list->cur; i++)
+ SvREFCNT_dec(list->array[i].arg);
Safefree(list->array);
}
Safefree(list);
arg = newSVpvn(as, alen);
PerlIO_list_push(aTHX_ av, layer,
(arg) ? arg : &PL_sv_undef);
- if (arg)
- SvREFCNT_dec(arg);
+ SvREFCNT_dec(arg);
}
else {
Perl_ck_warner(aTHX_ packWARN(WARN_LAYER), "Unknown PerlIO layer \"%.*s\"",
arg = (*l->tab->Getarg) (aTHX_ &l, NULL, 0);
PerlIO_list_push(aTHX_ layera, l->tab,
(arg) ? arg : &PL_sv_undef);
- if (arg)
- SvREFCNT_dec(arg);
+ SvREFCNT_dec(arg);
l = *PerlIONext(&l);
}
}
f = PerlIO_push(aTHX_ f, self, PerlIO_modestr(o,buf), arg);
if (PerlIOBase(o)->flags & PERLIO_F_UTF8)
PerlIOBase(f)->flags |= PERLIO_F_UTF8;
- if (arg)
- SvREFCNT_dec(arg);
+ SvREFCNT_dec(arg);
}
return f;
}
PerlIOBase(f)->flags |= PERLIO_F_TEMP;
PerlLIO_unlink(sv ? SvPVX_const(sv) : tempname);
}
- if (sv)
- SvREFCNT_dec(sv);
+ SvREFCNT_dec(sv);
# else /* !HAS_MKSTEMP, fallback to stdio tmpfile(). */
FILE * const stdio = PerlSIO_tmpfile();
sv_insert_flags(sv, pos, rem, repl, repl_len, 0);
if (repl_is_utf8)
SvUTF8_on(sv);
- if (repl_sv_copy)
- SvREFCNT_dec(repl_sv_copy);
+ SvREFCNT_dec(repl_sv_copy);
}
else if (lvalue) { /* it's an lvalue! */
if (!SvGMAGICAL(sv)) {
if (retval > 0 && big_utf8)
sv_pos_b2u(big, &retval);
}
- if (temp)
- SvREFCNT_dec(temp);
+ SvREFCNT_dec(temp);
fail:
PUSHi(retval + arybase);
RETURN;
{
dVAR;
SvREFCNT_inc_simple_void(gv);
- if (PL_defoutgv)
- SvREFCNT_dec(PL_defoutgv);
+ SvREFCNT_dec(PL_defoutgv);
PL_defoutgv = gv;
}
SVfARG(sv_name)
);
}
- if (sv_name)
- SvREFCNT_dec(sv_name);
+ SvREFCNT_dec(sv_name);
if (!cached)
SvREFCNT_dec(sv_str);
return len ? NULL : (regnode *)&len;
} else { /* zero length */
ret = reg_node(pRExC_state,NOTHING);
}
- if (!cached) {
+ SvREFCNT_dec(sv_name);
+ if (!cached)
SvREFCNT_dec(sv_str);
- }
- if (sv_name) {
- SvREFCNT_dec(sv_name);
- }
return ret;
}
*STRING(ret)= (char)value;
STR_LEN(ret)= 1;
RExC_emit += STR_SZ(1);
- if (listsv) {
- SvREFCNT_dec(listsv);
- }
+ SvREFCNT_dec(listsv);
return ret;
}
/* optimize case-insensitive simple patterns (e.g. /[a-z]/i) */
ReREFCNT_dec(r->mother_re);
} else {
CALLREGFREE_PVT(rx); /* free the private data */
- if (RXp_PAREN_NAMES(r))
- SvREFCNT_dec(RXp_PAREN_NAMES(r));
+ SvREFCNT_dec(RXp_PAREN_NAMES(r));
}
if (r->substrs) {
- if (r->anchored_substr)
- SvREFCNT_dec(r->anchored_substr);
- if (r->anchored_utf8)
- SvREFCNT_dec(r->anchored_utf8);
- if (r->float_substr)
- SvREFCNT_dec(r->float_substr);
- if (r->float_utf8)
- SvREFCNT_dec(r->float_utf8);
+ SvREFCNT_dec(r->anchored_substr);
+ SvREFCNT_dec(r->anchored_utf8);
+ SvREFCNT_dec(r->float_substr);
+ SvREFCNT_dec(r->float_utf8);
Safefree(r->substrs);
}
RX_MATCH_COPY_FREE(rx);
#ifdef PERL_OLD_COPY_ON_WRITE
- if (r->saved_copy)
- SvREFCNT_dec(r->saved_copy);
+ SvREFCNT_dec(r->saved_copy);
#endif
Safefree(r->offs);
}
{
/* If flags & SOMETHING - do not do it many times on the same match */
DEBUG_EXECUTE_r(PerlIO_printf(Perl_debug_log, "... Disabling check substring...\n"));
+ /* XXX Does the destruction order has to change with do_utf8? */
SvREFCNT_dec(do_utf8 ? prog->check_utf8 : prog->check_substr);
- if (do_utf8 ? prog->check_substr : prog->check_utf8)
- SvREFCNT_dec(do_utf8 ? prog->check_substr : prog->check_utf8);
+ SvREFCNT_dec(do_utf8 ? prog->check_substr : prog->check_utf8);
prog->check_substr = prog->check_utf8 = NULL; /* disable */
prog->float_substr = prog->float_utf8 = NULL; /* clear */
check = NULL; /* abort */
case SAVEt_AV: /* array reference */
av = MUTABLE_AV(SSPOPPTR);
gv = MUTABLE_GV(SSPOPPTR);
- if (GvAV(gv)) {
- SvREFCNT_dec(GvAV(gv));
- }
+ SvREFCNT_dec(GvAV(gv));
GvAV(gv) = av;
if (SvMAGICAL(av)) {
PL_localizing = 2;
case SAVEt_HV: /* hash reference */
hv = MUTABLE_HV(SSPOPPTR);
gv = MUTABLE_GV(SSPOPPTR);
- if (GvHV(gv)) {
- SvREFCNT_dec(GvHV(gv));
- }
+ SvREFCNT_dec(GvHV(gv));
GvHV(gv) = hv;
if (SvMAGICAL(hv)) {
PL_localizing = 2;