From: Gurusamy Sarathy Date: Mon, 21 Feb 2000 00:09:16 +0000 (+0000) Subject: more malloc.c tweaks for change#5070 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=1d860e8540fc3e1d7f817d85d4429f8631e61cdf;p=p5sagit%2Fp5-mst-13.2.git more malloc.c tweaks for change#5070 p4raw-link: @5070 on //depot/metaconfig: 0905a7e2c5c1d8a0937a928ec08bbe6e341eebb5on //depot/cfgperl: ad5513430ad41d3071839f83eb3da57da67fe68e p4raw-id: //depot/perl@5174 --- diff --git a/malloc.c b/malloc.c index 9864eac..d2041e5 100644 --- a/malloc.c +++ b/malloc.c @@ -1520,25 +1520,25 @@ Perl_mfree(void *mp) if (!bad_free_warn) return; #ifdef RCHECK -#ifdef PERL_CORE { dTHX; +#ifdef PERL_CORE if (!PERL_IS_ALIVE || !PL_curcop || ckWARN_d(WARN_MALLOC)) - Perl_warner(WARN_MALLOC, "%s free() ignored", + Perl_warner(aTHX_ WARN_MALLOC, "%s free() ignored", ovp->ov_rmagic == RMAGIC - 1 ? "Duplicate" : "Bad"); - } #else - warn("%s free() ignored", - ovp->ov_rmagic == RMAGIC - 1 ? "Duplicate" : "Bad"); + warn("%s free() ignored", + ovp->ov_rmagic == RMAGIC - 1 ? "Duplicate" : "Bad"); #endif #else #ifdef PERL_CORE - if (!PERL_IS_ALIVE || !PL_curcop || ckWARN_d(WARN_MALLOC)) - Perl_warner(WARN_MALLOC, "%s", "Bad free() ignored"); + if (!PERL_IS_ALIVE || !PL_curcop || ckWARN_d(WARN_MALLOC)) + Perl_warner(aTHX_ WARN_MALLOC, "%s", "Bad free() ignored"); #else - warn("%s", "Bad free() ignored"); + warn("%s", "Bad free() ignored"); #endif + } #endif return; /* sanity */ } @@ -1617,27 +1617,28 @@ Perl_realloc(void *mp, size_t nbytes) if (!bad_free_warn) return Nullch; #ifdef RCHECK -#ifdef PERL_CORE { dTHX; +#ifdef PERL_CORE if (!PERL_IS_ALIVE || !PL_curcop || ckWARN_d(WARN_MALLOC)) - Perl_warner(WARN_MALLOC, "%srealloc() %signored", + Perl_warner(aTHX_ WARN_MALLOC, "%srealloc() %signored", (ovp->ov_rmagic == RMAGIC - 1 ? "" : "Bad "), ovp->ov_rmagic == RMAGIC - 1 ? "of freed memory " : ""); - } #else - warn("%srealloc() %signored", - (ovp->ov_rmagic == RMAGIC - 1 ? "" : "Bad "), - ovp->ov_rmagic == RMAGIC - 1 ? "of freed memory " : ""); + warn("%srealloc() %signored", + (ovp->ov_rmagic == RMAGIC - 1 ? "" : "Bad "), + ovp->ov_rmagic == RMAGIC - 1 ? "of freed memory " : ""); #endif #else #ifdef PERL_CORE - if (!PERL_IS_ALIVE || !PL_curcop || ckWARN_d(WARN_MALLOC)) - Perl_warner(WARN_MALLOC, "%s", "Bad realloc() ignored"); + if (!PERL_IS_ALIVE || !PL_curcop || ckWARN_d(WARN_MALLOC)) + Perl_warner(aTHX_ WARN_MALLOC, "%s", + "Bad realloc() ignored"); #else - warn("%s", "Bad realloc() ignored"); + warn("%s", "Bad realloc() ignored"); #endif + } #endif return Nullch; /* sanity */ }