Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
ac0bffb9
Commit
ac0bffb9
authored
May 28, 2015
by
Yury Selivanov
Browse files
Options
Browse Files
Download
Plain Diff
Issue 24017: Drop getawaitablefunc and friends in favor of unaryfunc.
parents
ee941b02
6ef05909
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
16 deletions
+13
-16
Doc/c-api/typeobj.rst
Doc/c-api/typeobj.rst
+6
-6
Include/object.h
Include/object.h
+3
-6
Modules/_testcapimodule.c
Modules/_testcapimodule.c
+1
-1
Objects/genobject.c
Objects/genobject.c
+1
-1
Python/ceval.c
Python/ceval.c
+2
-2
No files found.
Doc/c-api/typeobj.rst
View file @
ac0bffb9
...
...
@@ -1357,12 +1357,12 @@ Async Object Structures
Here is the structure definition::
typedef struct {
getawaitable
func am_await;
getaiter
func am_aiter;
aiternext
func am_anext;
unary
func am_await;
unary
func am_aiter;
unary
func am_anext;
} PyAsyncMethods;
.. c:member::
getawaitable
func PyAsyncMethods.am_await
.. c:member::
unary
func 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::
getaiter
func PyAsyncMethods.am_aiter
.. c:member::
unary
func 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::
aiternext
func PyAsyncMethods.am_anext
.. c:member::
unary
func PyAsyncMethods.am_anext
The signature of this function is::
...
...
Include/object.h
View file @
ac0bffb9
...
...
@@ -173,9 +173,6 @@ typedef PyObject *(*ssizessizeargfunc)(PyObject *, Py_ssize_t, Py_ssize_t);
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
{
getawaitable
func
am_await
;
getaiter
func
am_aiter
;
aiternext
func
am_anext
;
unary
func
am_await
;
unary
func
am_aiter
;
unary
func
am_anext
;
}
PyAsyncMethods
;
typedef
struct
{
...
...
Modules/_testcapimodule.c
View file @
ac0bffb9
...
...
@@ -3987,7 +3987,7 @@ awaitObject_await(awaitObject *ao)
}
static
PyAsyncMethods
awaitType_as_async
=
{
(
getawaitablefunc
)
awaitObject_await
,
/* am_await */
(
unaryfunc
)
awaitObject_await
,
/* am_await */
0
,
/* am_aiter */
0
/* am_anext */
};
...
...
Objects/genobject.c
View file @
ac0bffb9
...
...
@@ -708,7 +708,7 @@ PyGen_NeedsFinalizing(PyGenObject *gen)
PyObject
*
_PyGen_GetAwaitableIter
(
PyObject
*
o
)
{
getawaitable
func
getter
=
NULL
;
unary
func
getter
=
NULL
;
PyTypeObject
*
ot
;
if
(
PyGen_CheckCoroutineExact
(
o
))
{
...
...
Python/ceval.c
View file @
ac0bffb9
...
...
@@ -1927,7 +1927,7 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
}
TARGET
(
GET_AITER
)
{
getaiter
func
getter
=
NULL
;
unary
func
getter
=
NULL
;
PyObject
*
iter
=
NULL
;
PyObject
*
awaitable
=
NULL
;
PyObject
*
obj
=
TOP
();
...
...
@@ -1974,7 +1974,7 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
}
TARGET
(
GET_ANEXT
)
{
aiternext
func
getter
=
NULL
;
unary
func
getter
=
NULL
;
PyObject
*
next_iter
=
NULL
;
PyObject
*
awaitable
=
NULL
;
PyObject
*
aiter
=
TOP
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment