diff Modules/_cursesmodule.c @ 12576:1c7c2dd1beb1 legacy-trunk

Vladimir Marangozov's long-awaited malloc restructuring. For more comments, read the patches@python.org archives. For documentation read the comments in mymalloc.h and objimpl.h. (This is not exactly what Vladimir posted to the patches list; I've made a few changes, and Vladimir sent me a fix in private email for a problem that only occurs in debug mode. I'm also holding back on his change to main.c, which seems unnecessary to me.)
author Guido van Rossum <guido@python.org>
date Wed, 03 May 2000 23:44:39 +0000
parents eaf93d5bb46c
children 77a5a14695b3
line wrap: on
line diff
--- a/Modules/_cursesmodule.c	Wed May 03 22:34:12 2000 +0000
+++ b/Modules/_cursesmodule.c	Wed May 03 23:44:39 2000 +0000
@@ -273,7 +273,7 @@
 	PyFileObject *in_fo;
 	PyFileObject *out_fo;
 	PyCursesScreenObject *xp;
-	xp = PyObject_NEW(PyCursesScreenObject, &PyCursesScreen_Type);
+	xp = PyObject_New(PyCursesScreenObject, &PyCursesScreen_Type);
 	if (xp == NULL)
 		return NULL;
 	return (PyObject *)xp;
@@ -289,7 +289,7 @@
 {
 	PyCursesWindowObject *wo;
 
-	wo = PyObject_NEW(PyCursesWindowObject, &PyCursesWindow_Type);
+	wo = PyObject_New(PyCursesWindowObject, &PyCursesWindow_Type);
 	if (wo == NULL)
 		return NULL;
 	wo->win = win;
@@ -303,7 +303,7 @@
 {
   if (wo->win != stdscr)
     delwin(wo->win);
-  PyMem_DEL(wo);
+  PyObject_Del(wo);
 }
 
 static PyObject *
@@ -1125,7 +1125,7 @@
 	WINDOW *pad;
 {
 	PyCursesPadObject *po;
-	po = PyObject_NEW(PyCursesPadObject, &PyCursesPad_Type);
+	po = PyObject_New(PyCursesPadObject, &PyCursesPad_Type);
 	if (po == NULL)
 		return NULL;
 	po->pad = pad;