summaryrefslogtreecommitdiffstats
path: root/Objects/unicodeobject.c
diff options
context:
space:
mode:
authorNeil Schemenauer <nascheme@enme.ucalgary.ca>2002-03-22 15:33:15 (GMT)
committerNeil Schemenauer <nascheme@enme.ucalgary.ca>2002-03-22 15:33:15 (GMT)
commitdcc819a5c9e3cb60eba05a3c0b2547bc1fb28b80 (patch)
tree124d72d29df550ba35d3a4b6ba66232619c85ee1 /Objects/unicodeobject.c
parenta1a9c51a3ef06614413f45d51e65588bcd0793f2 (diff)
downloadcpython-dcc819a5c9e3cb60eba05a3c0b2547bc1fb28b80.zip
cpython-dcc819a5c9e3cb60eba05a3c0b2547bc1fb28b80.tar.gz
cpython-dcc819a5c9e3cb60eba05a3c0b2547bc1fb28b80.tar.bz2
Use pymalloc if it's enabled.
Diffstat (limited to 'Objects/unicodeobject.c')
-rw-r--r--Objects/unicodeobject.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index 978ac54..73d5d9d 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -201,7 +201,7 @@ PyUnicodeObject *_PyUnicode_New(int length)
PyObject_INIT(unicode, &PyUnicode_Type);
}
else {
- unicode = PyObject_NEW(PyUnicodeObject, &PyUnicode_Type);
+ unicode = PyMalloc_New(PyUnicodeObject, &PyUnicode_Type);
if (unicode == NULL)
return NULL;
unicode->str = PyMem_NEW(Py_UNICODE, length + 1);
@@ -219,7 +219,7 @@ PyUnicodeObject *_PyUnicode_New(int length)
onError:
_Py_ForgetReference((PyObject *)unicode);
- PyObject_DEL(unicode);
+ PyMalloc_Del(unicode);
return NULL;
}
@@ -5711,7 +5711,7 @@ unicode_subtype_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
pnew->str = PyMem_NEW(Py_UNICODE, n+1);
if (pnew->str == NULL) {
_Py_ForgetReference((PyObject *)pnew);
- PyObject_DEL(pnew);
+ PyMalloc_Del(pnew);
return NULL;
}
Py_UNICODE_COPY(pnew->str, tmp->str, n+1);
@@ -5769,7 +5769,7 @@ PyTypeObject PyUnicode_Type = {
0, /* tp_init */
0, /* tp_alloc */
unicode_new, /* tp_new */
- _PyObject_Del, /* tp_free */
+ _PyMalloc_Del, /* tp_free */
};
/* Initialize the Unicode implementation */
@@ -5811,7 +5811,7 @@ _PyUnicode_Fini(void)
if (v->str)
PyMem_DEL(v->str);
Py_XDECREF(v->defenc);
- PyObject_DEL(v);
+ PyMalloc_Del(v);
}
unicode_freelist = NULL;
unicode_freelist_size = 0;