summaryrefslogtreecommitdiffstats
path: root/Objects/methodobject.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2018-10-26 12:35:00 (GMT)
committerGitHub <noreply@github.com>2018-10-26 12:35:00 (GMT)
commitb4435e20a92af474f117b78b98ddc6f515363af5 (patch)
tree4383bfb9ba3f9ec21a2d0cbdd726b38c5a9e1956 /Objects/methodobject.c
parent7cd25434164882c2093ea41ccfc7b95a05cd5cbd (diff)
downloadcpython-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/methodobject.c')
-rw-r--r--Objects/methodobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/methodobject.c b/Objects/methodobject.c
index 5ad2831..9176e39 100644
--- a/Objects/methodobject.c
+++ b/Objects/methodobject.c
@@ -31,7 +31,7 @@ PyCFunction_NewEx(PyMethodDef *ml, PyObject *self, PyObject *module)
op = free_list;
if (op != NULL) {
free_list = (PyCFunctionObject *)(op->m_self);
- (void)PyObject_INIT(op, &PyCFunction_Type);
+ (void)PyObject_INIT((PyObject *)op, &PyCFunction_Type);
numfree--;
}
else {