diff options
author | Victor Stinner <vstinner@redhat.com> | 2018-10-26 12:35:00 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-26 12:35:00 (GMT) |
commit | b4435e20a92af474f117b78b98ddc6f515363af5 (patch) | |
tree | 4383bfb9ba3f9ec21a2d0cbdd726b38c5a9e1956 /Objects/complexobject.c | |
parent | 7cd25434164882c2093ea41ccfc7b95a05cd5cbd (diff) | |
download | cpython-b4435e20a92af474f117b78b98ddc6f515363af5.zip cpython-b4435e20a92af474f117b78b98ddc6f515363af5.tar.gz cpython-b4435e20a92af474f117b78b98ddc6f515363af5.tar.bz2 |
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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/complexobject.c b/Objects/complexobject.c index 6e3d47b..eecdb52 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; } |