diff options
author | Marcus Holland-Moritz <mhx-perl@gmx.net> | 2008-10-22 03:37:21 +0200 |
---|---|---|
committer | Marcus Holland-Moritz <mhx-perl@gmx.net> | 2008-10-24 16:32:50 +0000 |
commit | 0b0ab8012d4b74bc5d71b9135bd023ebdcf5e983 (patch) | |
tree | c1750ed685f64e42cbe56bbda2e866c84304a103 /handy.h | |
parent | 2adc35ddaf8db18adcd670868af35e2971f35ab1 (diff) | |
download | perl-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.h | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -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 |