summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormig <mig>2011-03-21 13:41:50 (GMT)
committermig <mig>2011-03-21 13:41:50 (GMT)
commite2f462108ea96728189ad727b14d981ef17ec18d (patch)
tree19aa8fa524b667d5513ed8719df931fa62957ce1
parent23e778541ae5ff3bf0ef8b74c37bcd13b8f8ef94 (diff)
downloadtcl-e2f462108ea96728189ad727b14d981ef17ec18d.zip
tcl-e2f462108ea96728189ad727b14d981ef17ec18d.tar.gz
tcl-e2f462108ea96728189ad727b14d981ef17ec18d.tar.bz2
remove one level of indirection in non-mem-debug builds
-rw-r--r--generic/tclCkalloc.c12
-rw-r--r--generic/tclInt.h6
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 */
/*