summaryrefslogtreecommitdiff
path: root/malloc.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-02-21 00:09:16 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-02-21 00:09:16 +0000
commit1d860e8540fc3e1d7f817d85d4429f8631e61cdf (patch)
tree444016feedd0aac10b99faa2037f21c954bdcd78 /malloc.c
parente8cd8248d84d5cafd97f60fca2effc40c0cbafdc (diff)
downloadperl-1d860e8540fc3e1d7f817d85d4429f8631e61cdf.tar.gz
more malloc.c tweaks for change#5070
p4raw-link: @5070 on //depot/metaconfig: 0905a7e2c5c1d8a0937a928ec08bbe6e341eebb5on //depot/cfgperl: ad5513430ad41d3071839f83eb3da57da67fe68e p4raw-id: //depot/perl@5174
Diffstat (limited to 'malloc.c')
-rw-r--r--malloc.c35
1 files changed, 18 insertions, 17 deletions
diff --git a/malloc.c b/malloc.c
index 9864eac665..d2041e5fa5 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 */
}