mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
Remove PyMalloc_New and PyMalloc_Del.
This commit is contained in:
parent
510492e985
commit
7465ad2fc9
2 changed files with 4 additions and 4 deletions
|
|
@ -60,7 +60,7 @@ PyObject _Py_EllipsisObject = {
|
|||
PyObject *
|
||||
PySlice_New(PyObject *start, PyObject *stop, PyObject *step)
|
||||
{
|
||||
PySliceObject *obj = PyMalloc_New(PySliceObject, &PySlice_Type);
|
||||
PySliceObject *obj = PyObject_New(PySliceObject, &PySlice_Type);
|
||||
|
||||
if (obj == NULL)
|
||||
return NULL;
|
||||
|
|
@ -115,7 +115,7 @@ slice_dealloc(PySliceObject *r)
|
|||
Py_DECREF(r->step);
|
||||
Py_DECREF(r->start);
|
||||
Py_DECREF(r->stop);
|
||||
PyMalloc_Del(r);
|
||||
PyObject_Del(r);
|
||||
}
|
||||
|
||||
static PyObject *
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ PyStructSequence_New(PyTypeObject *type)
|
|||
{
|
||||
PyStructSequence *obj;
|
||||
|
||||
obj = PyMalloc_New(PyStructSequence, type);
|
||||
obj = PyObject_New(PyStructSequence, type);
|
||||
obj->ob_size = VISIBLE_SIZE_TP(type);
|
||||
|
||||
return (PyObject*) obj;
|
||||
|
|
@ -37,7 +37,7 @@ structseq_dealloc(PyStructSequence *obj)
|
|||
for (i = 0; i < size; ++i) {
|
||||
Py_XDECREF(obj->ob_item[i]);
|
||||
}
|
||||
PyMalloc_Del(obj);
|
||||
PyObject_Del(obj);
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue