summaryrefslogtreecommitdiff
path: root/Objects/complexobject.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2018-11-23 14:27:38 +0100
committerGitHub <noreply@github.com>2018-11-23 14:27:38 +0100
commitb509d52083e156f97d6bd36f2f894a052e960f03 (patch)
treee1df9b8a25b5bffccf4d20ef0a08487bab5def64 /Objects/complexobject.c
parent353933e712b6c7f7ba9a9a50bd5bd472db7c35d0 (diff)
downloadcpython-git-b509d52083e156f97d6bd36f2f894a052e960f03.tar.gz
bpo-35059: PyObject_INIT() casts to PyObject* (GH-10674)
PyObject_INIT() and PyObject_INIT_VAR() now cast their first argument to PyObject*, as done in Python 3.7. Revert partially commit b4435e20a92af474f117b78b98ddc6f515363af5.
Diffstat (limited to 'Objects/complexobject.c')
-rw-r--r--Objects/complexobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/complexobject.c b/Objects/complexobject.c
index eecdb52506..6e3d47b62d 100644
--- a/Objects/complexobject.c
+++ b/Objects/complexobject.c
@@ -228,7 +228,7 @@ PyComplex_FromCComplex(Py_complex cval)
op = (PyComplexObject *) PyObject_MALLOC(sizeof(PyComplexObject));
if (op == NULL)
return PyErr_NoMemory();
- (void)PyObject_INIT((PyObject *)op, &PyComplex_Type);
+ (void)PyObject_INIT(op, &PyComplex_Type);
op->cval = cval;
return (PyObject *) op;
}