PyObject_INIT(unicode, &PyUnicode_Type);
}
else {
- unicode = PyMalloc_New(PyUnicodeObject, &PyUnicode_Type);
+ unicode = PyObject_New(PyUnicodeObject, &PyUnicode_Type);
if (unicode == NULL)
return NULL;
unicode->str = PyMem_NEW(Py_UNICODE, length + 1);
onError:
_Py_ForgetReference((PyObject *)unicode);
- PyMalloc_Del(unicode);
+ PyObject_Del(unicode);
return NULL;
}
pnew->str = PyMem_NEW(Py_UNICODE, n+1);
if (pnew->str == NULL) {
_Py_ForgetReference((PyObject *)pnew);
- PyMalloc_Del(pnew);
+ PyObject_Del(pnew);
return NULL;
}
Py_UNICODE_COPY(pnew->str, tmp->str, n+1);
0, /* tp_init */
0, /* tp_alloc */
unicode_new, /* tp_new */
- _PyMalloc_Del, /* tp_free */
+ PyObject_Del, /* tp_free */
};
/* Initialize the Unicode implementation */
if (v->str)
PyMem_DEL(v->str);
Py_XDECREF(v->defenc);
- PyMalloc_Del(v);
+ PyObject_Del(v);
}
unicode_freelist = NULL;
unicode_freelist_size = 0;