It's safe to pass NULLs to SvREFCNT_dec.
#define LEAVESUB(sv) \
STMT_START { \
- if (sv) \
- SvREFCNT_dec(sv); \
+ SvREFCNT_dec(sv); \
} STMT_END
#define POPFORMAT(cx) \
#endif
lex_start(linestr_sv, rsfp, lex_start_flags);
- if(linestr_sv)
- SvREFCNT_dec(linestr_sv);
+ SvREFCNT_dec(linestr_sv);
PL_subname = newSVpvs("main");
and faster.
=for apidoc Am|void|SvREFCNT_dec|SV* sv
-Decrements the reference count of the given SV.
+Decrements the reference count of the given SV. I<sv> may be be NULL.
=for apidoc Am|void|SvREFCNT_dec_NN|SV* sv
Same as SvREFCNT_dec, but can only be used if you know I<sv>