summaryrefslogtreecommitdiff
path: root/handy.h
diff options
context:
space:
mode:
authorMarcus Holland-Moritz <mhx-perl@gmx.net>2008-10-22 03:37:21 +0200
committerMarcus Holland-Moritz <mhx-perl@gmx.net>2008-10-24 16:32:50 +0000
commit0b0ab8012d4b74bc5d71b9135bd023ebdcf5e983 (patch)
treec1750ed685f64e42cbe56bbda2e866c84304a103 /handy.h
parent2adc35ddaf8db18adcd670868af35e2971f35ab1 (diff)
downloadperl-0b0ab8012d4b74bc5d71b9135bd023ebdcf5e983.tar.gz
Refactor Perl_mem_log_ functions
Message-ID: <20081022013721.374a490c@r2d2> p4raw-id: //depot/perl@34567
Diffstat (limited to 'handy.h')
-rw-r--r--handy.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/handy.h b/handy.h
index 5303dbc465..c07350db57 100644
--- a/handy.h
+++ b/handy.h
@@ -768,11 +768,21 @@ Malloc_t Perl_mem_log_realloc(const UV n, const UV typesize, const char *typenam
Malloc_t Perl_mem_log_free(Malloc_t oldalloc, const char *filename, const int linenumber, const char *funcname);
+# ifdef PERL_CORE
+# ifdef PERL_MEM_LOG_STDERR
+enum mem_log_type {
+ MLT_ALLOC,
+ MLT_REALLOC,
+ MLT_FREE
+};
+# endif
+# endif
+
#endif
#ifdef PERL_MEM_LOG
-#define MEM_LOG_ALLOC(n,t,a) Perl_mem_log_alloc(n,sizeof(t),STRINGIFY(t),a,__FILE__,__LINE__,FUNCTION__)
-#define MEM_LOG_REALLOC(n,t,v,a) Perl_mem_log_realloc(n,sizeof(t),STRINGIFY(t),v,a,__FILE__,__LINE__,FUNCTION__)
+#define MEM_LOG_ALLOC(n,t,a) (t*)Perl_mem_log_alloc(n,sizeof(t),STRINGIFY(t),a,__FILE__,__LINE__,FUNCTION__)
+#define MEM_LOG_REALLOC(n,t,v,a) (t*)Perl_mem_log_realloc(n,sizeof(t),STRINGIFY(t),v,a,__FILE__,__LINE__,FUNCTION__)
#define MEM_LOG_FREE(a) Perl_mem_log_free(a,__FILE__,__LINE__,FUNCTION__)
#endif