From 14bc4e4d89c46ff418abdd84929fc5832b0a505f Mon Sep 17 00:00:00 2001 From: Neal Norwitz Date: Mon, 10 Apr 2006 06:57:06 +0000 Subject: [PATCH] Use PyObject_* allocator since FutureFeatures is small --- Python/compile.c | 2 +- Python/future.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Python/compile.c b/Python/compile.c index ae4c8503f0..6c8ec53d6a 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -314,7 +314,7 @@ compiler_free(struct compiler *c) 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); } diff --git a/Python/future.c b/Python/future.c index d22ed3461c..04fec22fd8 100644 --- a/Python/future.c +++ b/Python/future.c @@ -120,14 +120,14 @@ PyFuture_FromAST(mod_ty mod, const char *filename) { 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; -- 2.50.1