mirror of https://github.com/python/cpython.git
Remove casts to PyObject * when declaration is for PyObject *
This commit is contained in:
parent
bdbd84fdac
commit
8a13518d25
|
@ -355,7 +355,7 @@ delete_garbage(PyGC_Head *unreachable, PyGC_Head *old)
|
||||||
else {
|
else {
|
||||||
if ((clear = op->ob_type->tp_clear) != NULL) {
|
if ((clear = op->ob_type->tp_clear) != NULL) {
|
||||||
Py_INCREF(op);
|
Py_INCREF(op);
|
||||||
clear((PyObject *)op);
|
clear(op);
|
||||||
Py_DECREF(op);
|
Py_DECREF(op);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -879,7 +879,7 @@ _PyObject_GC_Malloc(size_t basicsize)
|
||||||
#ifdef WITH_CYCLE_GC
|
#ifdef WITH_CYCLE_GC
|
||||||
PyGC_Head *g = PyObject_MALLOC(sizeof(PyGC_Head) + basicsize);
|
PyGC_Head *g = PyObject_MALLOC(sizeof(PyGC_Head) + basicsize);
|
||||||
if (g == NULL)
|
if (g == NULL)
|
||||||
return (PyObject *)PyErr_NoMemory();
|
return PyErr_NoMemory();
|
||||||
g->gc.gc_next = NULL;
|
g->gc.gc_next = NULL;
|
||||||
generations[0].count++; /* number of allocated GC objects */
|
generations[0].count++; /* number of allocated GC objects */
|
||||||
if (generations[0].count > generations[0].threshold &&
|
if (generations[0].count > generations[0].threshold &&
|
||||||
|
@ -895,7 +895,7 @@ _PyObject_GC_Malloc(size_t basicsize)
|
||||||
#else
|
#else
|
||||||
op = PyObject_MALLOC(basicsize);
|
op = PyObject_MALLOC(basicsize);
|
||||||
if (op == NULL)
|
if (op == NULL)
|
||||||
return (PyObject *)PyErr_NoMemory();
|
return PyErr_NoMemory();
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
return op;
|
return op;
|
||||||
|
|
Loading…
Reference in New Issue