cpython: dfa0288c91fd (original) (raw)
Mercurial > cpython
changeset 96332:dfa0288c91fd 3.5
Issue 24017: Drop getawaitablefunc and friends in favor of unaryfunc.
Yury Selivanov yselivanov@sprymix.com | |
---|---|
date | Thu, 28 May 2015 11:21:31 -0400 |
parents | adf72cffceb7 |
children | 99dcca3466d3 23c913269b40 |
files | Doc/c-api/typeobj.rst Include/object.h Modules/_testcapimodule.c Objects/genobject.c Python/ceval.c |
diffstat | 5 files changed, 13 insertions(+), 16 deletions(-)[+] [-] Doc/c-api/typeobj.rst 12 Include/object.h 9 Modules/_testcapimodule.c 2 Objects/genobject.c 2 Python/ceval.c 4 |
line wrap: on
line diff
--- a/Doc/c-api/typeobj.rst +++ b/Doc/c-api/typeobj.rst @@ -1357,12 +1357,12 @@ Async Object Structures Here is the structure definition:: typedef struct {
getawaitablefunc am_await;[](#l1.7)
getaiterfunc am_aiter;[](#l1.8)
aiternextfunc am_anext;[](#l1.9)
unaryfunc am_await;[](#l1.10)
unaryfunc am_aiter;[](#l1.11)
unaryfunc am_anext;[](#l1.12) } PyAsyncMethods;[](#l1.13)
-.. c:member:: getawaitablefunc PyAsyncMethods.am_await
+.. c:member:: unaryfunc PyAsyncMethods.am_await
The signature of this function is::
@@ -1373,7 +1373,7 @@ Async Object Structures
This slot may be set to NULL if an object is not an :term:awaitable
.
-.. c:member:: getaiterfunc PyAsyncMethods.am_aiter
+.. c:member:: unaryfunc PyAsyncMethods.am_aiter
The signature of this function is::
@@ -1384,7 +1384,7 @@ Async Object Structures
This slot may be set to NULL if an object does not implement
asynchronous iteration protocol.
-.. c:member:: aiternextfunc PyAsyncMethods.am_anext
+.. c:member:: unaryfunc PyAsyncMethods.am_anext
The signature of this function is::
--- a/Include/object.h +++ b/Include/object.h @@ -173,9 +173,6 @@ typedef PyObject *(*ssizessizeargfunc)(P typedef int(*ssizeobjargproc)(PyObject *, Py_ssize_t, PyObject *); typedef int(*ssizessizeobjargproc)(PyObject *, Py_ssize_t, Py_ssize_t, PyObject *); typedef int(*objobjargproc)(PyObject *, PyObject *, PyObject *); -typedef PyObject *(*getawaitablefunc) (PyObject *); -typedef PyObject *(*getaiterfunc) (PyObject *); -typedef PyObject *(*aiternextfunc) (PyObject ); #ifndef Py_LIMITED_API / buffer interface */ @@ -305,9 +302,9 @@ typedef struct { } PyMappingMethods; typedef struct {
} PyAsyncMethods; typedef struct {
--- a/Modules/_testcapimodule.c +++ b/Modules/_testcapimodule.c @@ -3987,7 +3987,7 @@ awaitObject_await(awaitObject *ao) } static PyAsyncMethods awaitType_as_async = {
--- a/Objects/genobject.c +++ b/Objects/genobject.c @@ -708,7 +708,7 @@ PyGen_NeedsFinalizing(PyGenObject *gen) PyObject * _PyGen_GetAwaitableIter(PyObject *o) {
--- a/Python/ceval.c +++ b/Python/ceval.c @@ -1927,7 +1927,7 @@ PyEval_EvalFrameEx(PyFrameObject *f, int } TARGET(GET_AITER) {
getaiterfunc getter = NULL;[](#l5.7)
unaryfunc getter = NULL;[](#l5.8) PyObject *iter = NULL;[](#l5.9) PyObject *awaitable = NULL;[](#l5.10) PyObject *obj = TOP();[](#l5.11)
@@ -1974,7 +1974,7 @@ PyEval_EvalFrameEx(PyFrameObject *f, int } TARGET(GET_ANEXT) {
aiternextfunc getter = NULL;[](#l5.16)
unaryfunc getter = NULL;[](#l5.17) PyObject *next_iter = NULL;[](#l5.18) PyObject *awaitable = NULL;[](#l5.19) PyObject *aiter = TOP();[](#l5.20)