Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cython
Commits
4721cf06
Commit
4721cf06
authored
Jul 30, 2017
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
repair coroutine delegation in await expressions (must pass through "gen->yieldfrom" check)
parent
18cebc31
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
6 deletions
+5
-6
Cython/Utility/AsyncGen.c
Cython/Utility/AsyncGen.c
+2
-2
Cython/Utility/Coroutine.c
Cython/Utility/Coroutine.c
+3
-4
No files found.
Cython/Utility/AsyncGen.c
View file @
4721cf06
...
...
@@ -495,7 +495,7 @@ __Pyx_async_gen_asend_send(__pyx_PyAsyncGenASend *o, PyObject *arg)
o
->
ags_state
=
__PYX_AWAITABLE_STATE_ITER
;
}
result
=
__Pyx_Coroutine_Send
Ex
((
__pyx_CoroutineObject
*
)
o
->
ags_gen
,
arg
,
0
);
result
=
__Pyx_Coroutine_Send
((
PyObject
*
)
o
->
ags_gen
,
arg
);
result
=
__Pyx_async_gen_unwrap_value
(
o
->
ags_gen
,
result
);
if
(
result
==
NULL
)
{
...
...
@@ -839,7 +839,7 @@ __Pyx_async_gen_athrow_send(__pyx_PyAsyncGenAThrow *o, PyObject *arg)
assert
(
o
->
agt_state
==
__PYX_AWAITABLE_STATE_ITER
);
retval
=
__Pyx_Coroutine_Send
Ex
((
__pyx_CoroutineObject
*
)
gen
,
arg
,
0
);
retval
=
__Pyx_Coroutine_Send
((
PyObject
*
)
gen
,
arg
);
if
(
o
->
agt_args
)
{
return
__Pyx_async_gen_unwrap_value
(
o
->
agt_gen
,
retval
);
}
else
{
...
...
Cython/Utility/Coroutine.c
View file @
4721cf06
...
...
@@ -419,6 +419,9 @@ static PyTypeObject *__pyx_CoroutineAwaitType = 0;
static
int
__pyx_Coroutine_init
(
void
);
/*proto*/
static
PyObject
*
__Pyx__Coroutine_await
(
PyObject
*
coroutine
);
/*proto*/
static
PyObject
*
__Pyx_Coroutine_Send
(
PyObject
*
self
,
PyObject
*
value
);
/*proto*/
static
PyObject
*
__Pyx_Coroutine_Close
(
PyObject
*
self
);
/*proto*/
static
PyObject
*
__Pyx_Coroutine_Throw
(
PyObject
*
gen
,
PyObject
*
args
);
/*proto*/
//////////////////// Generator.proto ////////////////////
...
...
@@ -452,10 +455,6 @@ static int __pyx_Generator_init(void); /*proto*/
#include <structmember.h>
#include <frameobject.h>
static
PyObject
*
__Pyx_Coroutine_Send
(
PyObject
*
self
,
PyObject
*
value
);
static
PyObject
*
__Pyx_Coroutine_Close
(
PyObject
*
self
);
static
PyObject
*
__Pyx_Coroutine_Throw
(
PyObject
*
gen
,
PyObject
*
args
);
#define __Pyx_Coroutine_Undelegate(gen) Py_CLEAR((gen)->yieldfrom)
// If StopIteration exception is set, fetches its 'value'
...
...
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