summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 */
/*