diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | generic/tclCkalloc.c | 12 | ||||
-rw-r--r-- | generic/tclInt.h | 6 |
3 files changed, 18 insertions, 6 deletions
@@ -1,3 +1,9 @@ +2011-03-21 Miguel Sofer <msofer@users.sf.net> + + * generic/tclCkAlloc.c: + * generic/tclInt.h: remove one level of allocator indirection in + non memdebug builds, imported from mig-alloc-reform. + 2011-03-20 Miguel Sofer <msofer@users.sf.net> * generic/tclThreadAlloc.c: imported HAVE_FAST_TSD support from diff --git a/generic/tclCkalloc.c b/generic/tclCkalloc.c index 9d63ebf..056841d 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 42e2212..53e4323 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -4628,6 +4628,12 @@ typedef struct NRE_callback { #include "tclIntPlatDecls.h" #include "tclTomMathDecls.h" +#if !defined(USE_TCL_STUBS) && !defined(TCL_MEM_DEBUG) +#define Tcl_AttemptAlloc(size) TclpAlloc(size) +#define Tcl_AttemptRealloc(ptr, size) TclpRealloc((ptr), (size)) +#define Tcl_Free(ptr) TclpFree(ptr) +#endif + #endif /* _TCLINT */ /* |