diff -r be70d64bbf88 Include/abstract.h --- a/Include/abstract.h Fri Dec 02 01:13:46 2016 +0100 +++ b/Include/abstract.h Fri Dec 02 01:35:10 2016 +0100 @@ -334,14 +334,23 @@ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Py_ssize_t nargs, PyObject *kwnames); -#define _PyObject_FastCall(func, args, nargs) \ - _PyObject_FastCallDict((func), (args), (nargs), NULL) +static inline PyObject* +_PyObject_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs) +{ + return _PyObject_FastCallDict(func, args, nargs, NULL); +} -#define _PyObject_CallNoArg(func) \ - _PyObject_FastCall((func), NULL, 0) +static inline PyObject* +_PyObject_CallNoArg(PyObject *func) +{ + return _PyObject_FastCallDict(func, NULL, 0, NULL); +} -#define _PyObject_CallArg1(func, arg) \ - _PyObject_FastCall((func), &(arg), 1) +static inline PyObject* +_PyObject_CallArg1(PyObject *func, PyObject *arg) +{ + return _PyObject_FastCallDict(func, &arg, 1, NULL); +} PyAPI_FUNC(PyObject *) _PyObject_Call_Prepend(PyObject *func, PyObject *obj, PyObject *args, diff -r be70d64bbf88 Modules/_asynciomodule.c --- a/Modules/_asynciomodule.c Fri Dec 02 01:13:46 2016 +0100 +++ b/Modules/_asynciomodule.c Fri Dec 02 01:35:10 2016 +0100 @@ -721,7 +721,7 @@ static PyObject * _asyncio_Future__repr_info_impl(FutureObj *self) /*[clinic end generated code: output=fa69e901bd176cfb input=f21504d8e2ae1ca2]*/ { - return _PyObject_CallArg1(asyncio_future_repr_info_func, self); + return _PyObject_CallArg1(asyncio_future_repr_info_func, (PyObject *)self); } /*[clinic input] @@ -1536,7 +1536,7 @@ static PyObject * _asyncio_Task__repr_info_impl(TaskObj *self) /*[clinic end generated code: output=6a490eb66d5ba34b input=3c6d051ed3ddec8b]*/ { - return _PyObject_CallArg1(asyncio_task_repr_info_func, self); + return _PyObject_CallArg1(asyncio_task_repr_info_func, (PyObject *)self); } /*[clinic input] diff -r be70d64bbf88 Modules/gcmodule.c --- a/Modules/gcmodule.c Fri Dec 02 01:13:46 2016 +0100 +++ b/Modules/gcmodule.c Fri Dec 02 01:35:10 2016 +0100 @@ -709,7 +709,7 @@ handle_weakrefs(PyGC_Head *unreachable, assert(callback != NULL); /* copy-paste of weakrefobject.c's handle_callback() */ - temp = _PyObject_CallArg1(callback, wr); + temp = _PyObject_CallArg1(callback, (PyObject *)wr); if (temp == NULL) PyErr_WriteUnraisable(callback); else diff -r be70d64bbf88 Objects/genobject.c --- a/Objects/genobject.c Fri Dec 02 01:13:46 2016 +0100 +++ b/Objects/genobject.c Fri Dec 02 01:35:10 2016 +0100 @@ -1341,7 +1341,7 @@ async_gen_init_hooks(PyAsyncGenObject *o PyObject *res; Py_INCREF(firstiter); - res = _PyObject_CallArg1(firstiter, o); + res = _PyObject_CallArg1(firstiter, (PyObject *)o); Py_DECREF(firstiter); if (res == NULL) { return 1; diff -r be70d64bbf88 Objects/weakrefobject.c --- a/Objects/weakrefobject.c Fri Dec 02 01:13:46 2016 +0100 +++ b/Objects/weakrefobject.c Fri Dec 02 01:35:10 2016 +0100 @@ -867,7 +867,7 @@ PyWeakref_GetObject(PyObject *ref) static void handle_callback(PyWeakReference *ref, PyObject *callback) { - PyObject *cbresult = _PyObject_CallArg1(callback, ref); + PyObject *cbresult = _PyObject_CallArg1(callback, (PyObject *)ref); if (cbresult == NULL) PyErr_WriteUnraisable(callback);