[Python-checkins] r45226 - python/trunk/Python/compile.c python/trunk/Python/future.c

neal.norwitz python-checkins at python.org
Mon Apr 10 08:57:06 CEST 2006


Author: neal.norwitz
Date: Mon Apr 10 08:57:06 2006
New Revision: 45226

Modified:
   python/trunk/Python/compile.c
   python/trunk/Python/future.c
Log:
Use PyObject_* allocator since FutureFeatures is small

Modified: python/trunk/Python/compile.c
==============================================================================
--- python/trunk/Python/compile.c	(original)
+++ python/trunk/Python/compile.c	Mon Apr 10 08:57:06 2006
@@ -314,7 +314,7 @@
 	if (c->c_st)
 		PySymtable_Free(c->c_st);
 	if (c->c_future)
-		PyMem_Free(c->c_future);
+		PyObject_Free(c->c_future);
 	Py_DECREF(c->c_stack);
 }
 

Modified: python/trunk/Python/future.c
==============================================================================
--- python/trunk/Python/future.c	(original)
+++ python/trunk/Python/future.c	Mon Apr 10 08:57:06 2006
@@ -120,14 +120,14 @@
 {
 	PyFutureFeatures *ff;
 
-	ff = (PyFutureFeatures *)PyMem_Malloc(sizeof(PyFutureFeatures));
+	ff = (PyFutureFeatures *)PyObject_Malloc(sizeof(PyFutureFeatures));
 	if (ff == NULL)
 		return NULL;
 	ff->ff_features = 0;
 	ff->ff_lineno = -1;
 
 	if (!future_parse(ff, mod, filename)) {
-		PyMem_Free((void *)ff);
+		PyObject_Free(ff);
 		return NULL;
 	}
 	return ff;


More information about the Python-checkins mailing list