summaryrefslogtreecommitdiff
path: root/Objects/complexobject.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2018-10-26 14:35:00 +0200
committerGitHub <noreply@github.com>2018-10-26 14:35:00 +0200
commitb4435e20a92af474f117b78b98ddc6f515363af5 (patch)
tree4383bfb9ba3f9ec21a2d0cbdd726b38c5a9e1956 /Objects/complexobject.c
parent7cd25434164882c2093ea41ccfc7b95a05cd5cbd (diff)
downloadcpython-git-b4435e20a92af474f117b78b98ddc6f515363af5.tar.gz
bpo-35059: Convert PyObject_INIT() to function (GH-10077)
* Convert PyObject_INIT() and PyObject_INIT_VAR() macros to static inline functions. * Fix usage of these functions: cast to PyObject* or PyVarObject*.
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 6e3d47b62d..eecdb52506 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(op, &PyComplex_Type);
+ (void)PyObject_INIT((PyObject *)op, &PyComplex_Type);
op->cval = cval;
return (PyObject *) op;
}