From e2f462108ea96728189ad727b14d981ef17ec18d Mon Sep 17 00:00:00 2001 From: mig Date: Mon, 21 Mar 2011 13:41:50 +0000 Subject: remove one level of indirection in non-mem-debug builds --- generic/tclCkalloc.c | 12 ++++++------ generic/tclInt.h | 6 ++++++ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/generic/tclCkalloc.c b/generic/tclCkalloc.c index 3b51f68..afc6594 100644 --- a/generic/tclCkalloc.c +++ b/generic/tclCkalloc.c @@ -20,6 +20,12 @@ #define FALSE 0 #define TRUE 1 +#undef Tcl_Alloc +#undef Tcl_Free +#undef Tcl_Realloc +#undef Tcl_AttemptAlloc +#undef Tcl_AttemptRealloc + #ifdef TCL_MEM_DEBUG /* @@ -736,12 +742,6 @@ Tcl_AttemptDbCkrealloc( *---------------------------------------------------------------------- */ -#undef Tcl_Alloc -#undef Tcl_Free -#undef Tcl_Realloc -#undef Tcl_AttemptAlloc -#undef Tcl_AttemptRealloc - char * Tcl_Alloc( unsigned int size) diff --git a/generic/tclInt.h b/generic/tclInt.h index 911cea6..f728a80 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -4500,6 +4500,12 @@ typedef struct NRE_callback { #include "tclIntPlatDecls.h" #include "tclTomMathDecls.h" +#if !defined(USE_TCL_STUBS) && !defined(TCL_MEM_DEBUG) +#define Tcl_AttemptAlloc TclpAlloc +#define Tcl_AttemptRealloc TclpRealloc +#define Tcl_Free TclpFree +#endif + #endif /* _TCLINT */ /* -- cgit v0.12