diff options
author | Nicholas Clark <nick@ccl4.org> | 2009-10-12 16:39:02 +0100 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2009-10-12 16:39:02 +0100 |
commit | 9b38784150c0aca5746105b5f00bfc653322bcd1 (patch) | |
tree | 48457d0d7c2cf65438740ec90bf3382203837dba /perl.c | |
parent | a2a5de9516c1b256b060768ac6dad252a3aa3be7 (diff) | |
download | perl-9b38784150c0aca5746105b5f00bfc653322bcd1.tar.gz |
Add Perl_ck_warner_d(), which combines Perl_ckwarn_d() and Perl_warner().
Replace ckWARN_d{,2,3,4}() && Perl_warner() with it, which trades reduced code
size for 1 more function call if warnings are not enabled.
Diffstat (limited to 'perl.c')
-rw-r--r-- | perl.c | 22 |
1 files changed, 11 insertions, 11 deletions
@@ -1049,21 +1049,21 @@ perl_destruct(pTHXx) SvREFCNT_dec(PL_isarev); FREETMPS; - if (destruct_level >= 2 && ckWARN_d(WARN_INTERNAL)) { + if (destruct_level >= 2) { if (PL_scopestack_ix != 0) - Perl_warner(aTHX_ packWARN(WARN_INTERNAL), - "Unbalanced scopes: %ld more ENTERs than LEAVEs\n", - (long)PL_scopestack_ix); + Perl_ck_warner_d(aTHX_ packWARN(WARN_INTERNAL), + "Unbalanced scopes: %ld more ENTERs than LEAVEs\n", + (long)PL_scopestack_ix); if (PL_savestack_ix != 0) - Perl_warner(aTHX_ packWARN(WARN_INTERNAL), - "Unbalanced saves: %ld more saves than restores\n", - (long)PL_savestack_ix); + Perl_ck_warner_d(aTHX_ packWARN(WARN_INTERNAL), + "Unbalanced saves: %ld more saves than restores\n", + (long)PL_savestack_ix); if (PL_tmps_floor != -1) - Perl_warner(aTHX_ packWARN(WARN_INTERNAL),"Unbalanced tmps: %ld more allocs than frees\n", - (long)PL_tmps_floor + 1); + Perl_ck_warner_d(aTHX_ packWARN(WARN_INTERNAL),"Unbalanced tmps: %ld more allocs than frees\n", + (long)PL_tmps_floor + 1); if (cxstack_ix != -1) - Perl_warner(aTHX_ packWARN(WARN_INTERNAL),"Unbalanced context: %ld more PUSHes than POPs\n", - (long)cxstack_ix + 1); + Perl_ck_warner_d(aTHX_ packWARN(WARN_INTERNAL),"Unbalanced context: %ld more PUSHes than POPs\n", + (long)cxstack_ix + 1); } /* Now absolutely destruct everything, somehow or other, loops or no. */ |