summaryrefslogtreecommitdiff
path: root/handy.h
diff options
context:
space:
mode:
authorMarcus Holland-Moritz <mhx-perl@gmx.net>2008-10-24 21:49:21 +0000
committerMarcus Holland-Moritz <mhx-perl@gmx.net>2008-10-24 21:49:21 +0000
commitd1401ee92e9e5e7c3e719cc5c210862a444379d1 (patch)
treeabb603a15279ddb176b2ff66bec5b4434156a5c3 /handy.h
parent3eef1deb309c16a8db9dd07824d1bb506fc26d1d (diff)
downloadperl-d1401ee92e9e5e7c3e719cc5c210862a444379d1.tar.gz
Make C++ compilers happy #4: move cast so Newc() and
Renewc() will return the correct type under PERL_MEM_LOG. p4raw-id: //depot/perl@34577
Diffstat (limited to 'handy.h')
-rw-r--r--handy.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/handy.h b/handy.h
index 25988b5193..8f1dace7f3 100644
--- a/handy.h
+++ b/handy.h
@@ -786,8 +786,8 @@ void Perl_mem_log_del_sv(const SV *sv, const char *filename, const int linenumbe
#endif
#ifdef PERL_MEM_LOG
-#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_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_FREE(a) Perl_mem_log_free(a,__FILE__,__LINE__,FUNCTION__)
#endif
@@ -801,9 +801,9 @@ void Perl_mem_log_del_sv(const SV *sv, const char *filename, const int linenumbe
#define MEM_LOG_FREE(a) (a)
#endif
-#define Newx(v,n,t) (v = (MEM_WRAP_CHECK_(n,t) MEM_LOG_ALLOC(n,t,(t*)safemalloc((MEM_SIZE)((n)*sizeof(t))))))
-#define Newxc(v,n,t,c) (v = (MEM_WRAP_CHECK_(n,t) MEM_LOG_ALLOC(n,t,(c*)safemalloc((MEM_SIZE)((n)*sizeof(t))))))
-#define Newxz(v,n,t) (v = (MEM_WRAP_CHECK_(n,t) MEM_LOG_ALLOC(n,t,(t*)safecalloc((n),sizeof(t)))))
+#define Newx(v,n,t) (v = (MEM_WRAP_CHECK_(n,t) (t*)MEM_LOG_ALLOC(n,t,safemalloc((MEM_SIZE)((n)*sizeof(t))))))
+#define Newxc(v,n,t,c) (v = (MEM_WRAP_CHECK_(n,t) (c*)MEM_LOG_ALLOC(n,t,safemalloc((MEM_SIZE)((n)*sizeof(t))))))
+#define Newxz(v,n,t) (v = (MEM_WRAP_CHECK_(n,t) (t*)MEM_LOG_ALLOC(n,t,safecalloc((n),sizeof(t)))))
#ifndef PERL_CORE
/* pre 5.9.x compatibility */
@@ -813,9 +813,9 @@ void Perl_mem_log_del_sv(const SV *sv, const char *filename, const int linenumbe
#endif
#define Renew(v,n,t) \
- (v = (MEM_WRAP_CHECK_(n,t) MEM_LOG_REALLOC(n,t,v,(t*)saferealloc((Malloc_t)(v),(MEM_SIZE)((n)*sizeof(t))))))
+ (v = (MEM_WRAP_CHECK_(n,t) (t*)MEM_LOG_REALLOC(n,t,v,saferealloc((Malloc_t)(v),(MEM_SIZE)((n)*sizeof(t))))))
#define Renewc(v,n,t,c) \
- (v = (MEM_WRAP_CHECK_(n,t) MEM_LOG_REALLOC(n,t,v,(c*)saferealloc((Malloc_t)(v),(MEM_SIZE)((n)*sizeof(t))))))
+ (v = (MEM_WRAP_CHECK_(n,t) (c*)MEM_LOG_REALLOC(n,t,v,saferealloc((Malloc_t)(v),(MEM_SIZE)((n)*sizeof(t))))))
#ifdef PERL_POISON
#define Safefree(d) \