Skip to content

Commit 7465ad2

Browse files
committed
Remove PyMalloc_New and PyMalloc_Del.
1 parent 510492e commit 7465ad2

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

Objects/sliceobject.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ PyObject _Py_EllipsisObject = {
6060
PyObject *
6161
PySlice_New(PyObject *start, PyObject *stop, PyObject *step)
6262
{
63-
PySliceObject *obj = PyMalloc_New(PySliceObject, &PySlice_Type);
63+
PySliceObject *obj = PyObject_New(PySliceObject, &PySlice_Type);
6464

6565
if (obj == NULL)
6666
return NULL;
@@ -115,7 +115,7 @@ slice_dealloc(PySliceObject *r)
115115
Py_DECREF(r->step);
116116
Py_DECREF(r->start);
117117
Py_DECREF(r->stop);
118-
PyMalloc_Del(r);
118+
PyObject_Del(r);
119119
}
120120

121121
static PyObject *

Objects/structseq.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ PyStructSequence_New(PyTypeObject *type)
2222
{
2323
PyStructSequence *obj;
2424

25-
obj = PyMalloc_New(PyStructSequence, type);
25+
obj = PyObject_New(PyStructSequence, type);
2626
obj->ob_size = VISIBLE_SIZE_TP(type);
2727

2828
return (PyObject*) obj;
@@ -37,7 +37,7 @@ structseq_dealloc(PyStructSequence *obj)
3737
for (i = 0; i < size; ++i) {
3838
Py_XDECREF(obj->ob_item[i]);
3939
}
40-
PyMalloc_Del(obj);
40+
PyObject_Del(obj);
4141
}
4242

4343
static int

0 commit comments

Comments
 (0)