This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
No need to wrap INIT_TRACK_MEMPOOL with #ifdef PERL_TRACK_MEMPOOL
authorNicholas Clark <nick@ccl4.org>
Wed, 22 Sep 2021 09:32:55 +0000 (09:32 +0000)
committerNicholas Clark <nick@ccl4.org>
Tue, 28 Sep 2021 06:12:27 +0000 (06:12 +0000)
`INIT_TRACK_MEMPOOL` is defined as a no-op if `PERL_TRACK_MEMPOOL` is not
defined, so no need to wrap it in `#ifdef`.

Spotted by Ilmari.

perl.c

diff --git a/perl.c b/perl.c
index f498f96..c9807b7 100644 (file)
--- a/perl.c
+++ b/perl.c
@@ -193,9 +193,7 @@ perl_alloc(void)
     PerlInterpreter *my_perl = (PerlInterpreter*)PerlMem_calloc(1, sizeof(PerlInterpreter));
 
     S_init_tls_and_interp(my_perl);
-#ifdef PERL_TRACK_MEMPOOL
     INIT_TRACK_MEMPOOL(PL_memory_debug_header, my_perl);
-#endif
     return my_perl;
 }
 #endif /* PERL_IMPLICIT_SYS */