summaryrefslogtreecommitdiffstats
path: root/Mac
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>1996-10-23 15:46:57 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>1996-10-23 15:46:57 (GMT)
commit46ed276bc36b0f72a0b20068cf1a490c9bdbdbed (patch)
treee9b4e283f748e617c09ebc473a65de64188e98e0 /Mac
parent6b9e56012a004ae44b15407457b92910528d0b90 (diff)
downloadcpython-46ed276bc36b0f72a0b20068cf1a490c9bdbdbed.zip
cpython-46ed276bc36b0f72a0b20068cf1a490c9bdbdbed.tar.gz
cpython-46ed276bc36b0f72a0b20068cf1a490c9bdbdbed.tar.bz2
Malloc debugging now flagged with USE_MALLOC_DEBUG
Diffstat (limited to 'Mac')
-rw-r--r--Mac/Modules/macmodule.c9
-rw-r--r--Mac/mwerks/malloc/malloc.c4
2 files changed, 6 insertions, 7 deletions
diff --git a/Mac/Modules/macmodule.c b/Mac/Modules/macmodule.c
index 4c856fc..4231346 100644
--- a/Mac/Modules/macmodule.c
+++ b/Mac/Modules/macmodule.c
@@ -67,9 +67,6 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#endif
/* Optional routines, for some compiler/runtime combinations */
-#if defined(__MWERKS__) && defined(__powerc)
-#define MALLOC_DEBUG
-#endif
#if defined(USE_GUSI) || !defined(__MWERKS__)
#define WEHAVE_FDOPEN
#endif
@@ -581,7 +578,7 @@ mac_write(self, args)
return newintobject((long)size);
}
-#ifdef MALLOC_DEBUG
+#ifdef USE_MALLOC_DEBUG
static object *
mac_mstats(self, args)
object*self;
@@ -591,7 +588,7 @@ mac_mstats(self, args)
INCREF(None);
return None;
}
-#endif MALLOC_DEBUG
+#endif USE_MALLOC_DEBUG
static struct methodlist mac_methods[] = {
{"chdir", mac_chdir},
@@ -617,7 +614,7 @@ static struct methodlist mac_methods[] = {
{"remove", mac_unlink},
{"unlink", mac_unlink},
{"write", mac_write},
-#ifdef MALLOC_DEBUG
+#ifdef USE_MALLOC_DEBUG
{"mstats", mac_mstats},
#endif
diff --git a/Mac/mwerks/malloc/malloc.c b/Mac/mwerks/malloc/malloc.c
index 897d500..5178b66 100644
--- a/Mac/mwerks/malloc/malloc.c
+++ b/Mac/mwerks/malloc/malloc.c
@@ -52,12 +52,14 @@ static char *rcsid = "$Id$";
*
*/
-
+#ifdef USE_MALLOC_DEBUG
+/* You may also selectively enable some of these (but some are interdependent) */
#define DEBUG
#define DEBUG2
#define MSTATS
#define RCHECK
#define VCHECK
+#endif /* USE_MALLOC_DEBUG */
typedef unsigned char u_char;
typedef unsigned long u_long;