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
Gwenaël Samain
cython
Commits
e3ec8cd8
Commit
e3ec8cd8
authored
Jun 05, 2017
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update PEP 525 implementation to match the code in Py3.6/7 (currently non-functional)
parent
32192948
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
195 additions
and
132 deletions
+195
-132
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+2
-1
Cython/Utility/AsyncGen.c
Cython/Utility/AsyncGen.c
+190
-128
Cython/Utility/Coroutine.c
Cython/Utility/Coroutine.c
+3
-3
No files found.
Cython/Compiler/ExprNodes.py
View file @
e3ec8cd8
...
@@ -9473,7 +9473,8 @@ class YieldExprNode(ExprNode):
...
@@ -9473,7 +9473,8 @@ class YieldExprNode(ExprNode):
code
.
putln
(
"%s->resume_label = %d;"
%
(
code
.
putln
(
"%s->resume_label = %d;"
%
(
Naming
.
generator_cname
,
label_num
))
Naming
.
generator_cname
,
label_num
))
if
self
.
in_async_gen
and
not
self
.
is_await
:
if
self
.
in_async_gen
and
not
self
.
is_await
:
code
.
putln
(
"return __pyx__PyAsyncGenWrapValue(%s);"
%
Naming
.
retval_cname
)
# __Pyx__PyAsyncGenValueWrapperNew() steals a reference to the return value
code
.
putln
(
"return __Pyx__PyAsyncGenValueWrapperNew(%s);"
%
Naming
.
retval_cname
)
else
:
else
:
code
.
putln
(
"return %s;"
%
Naming
.
retval_cname
)
code
.
putln
(
"return %s;"
%
Naming
.
retval_cname
)
...
...
Cython/Utility/AsyncGen.c
View file @
e3ec8cd8
This diff is collapsed.
Click to expand it.
Cython/Utility/Coroutine.c
View file @
e3ec8cd8
...
@@ -292,7 +292,7 @@ static CYTHON_INLINE PyObject *__Pyx_Coroutine_GetAsyncIter(PyObject *obj) {
...
@@ -292,7 +292,7 @@ static CYTHON_INLINE PyObject *__Pyx_Coroutine_GetAsyncIter(PyObject *obj) {
static
CYTHON_INLINE
PyObject
*
__Pyx_Coroutine_AsyncIterNext
(
PyObject
*
obj
)
{
static
CYTHON_INLINE
PyObject
*
__Pyx_Coroutine_AsyncIterNext
(
PyObject
*
obj
)
{
#ifdef __Pyx_AsyncGen_USED
#ifdef __Pyx_AsyncGen_USED
if
(
__Pyx_AsyncGen_CheckExact
(
obj
))
{
if
(
__Pyx_AsyncGen_CheckExact
(
obj
))
{
return
__Pyx_
AsyncGen_AN
ext
(
obj
);
return
__Pyx_
async_gen_an
ext
(
obj
);
}
}
#endif
#endif
#if CYTHON_USE_ASYNC_SLOTS
#if CYTHON_USE_ASYNC_SLOTS
...
@@ -927,7 +927,7 @@ static int __Pyx_Coroutine_clear(PyObject *self) {
...
@@ -927,7 +927,7 @@ static int __Pyx_Coroutine_clear(PyObject *self) {
Py_CLEAR
(
gen
->
exc_traceback
);
Py_CLEAR
(
gen
->
exc_traceback
);
#ifdef __Pyx_AsyncGen_USED
#ifdef __Pyx_AsyncGen_USED
if
(
__Pyx_AsyncGen_CheckExact
(
self
))
{
if
(
__Pyx_AsyncGen_CheckExact
(
self
))
{
Py_CLEAR
(((
__pyx_AsyncGenObject
*
)
gen
)
->
ag_finalizer
);
Py_CLEAR
(((
__pyx_
Py
AsyncGenObject
*
)
gen
)
->
ag_finalizer
);
}
}
#endif
#endif
Py_CLEAR
(
gen
->
gi_name
);
Py_CLEAR
(
gen
->
gi_name
);
...
@@ -1324,7 +1324,7 @@ static void __Pyx_Coroutine_check_and_dealloc(PyObject *self) {
...
@@ -1324,7 +1324,7 @@ static void __Pyx_Coroutine_check_and_dealloc(PyObject *self) {
PyObject_GC_Track
(
self
);
PyObject_GC_Track
(
self
);
#ifdef __Pyx_AsyncGen_USED
#ifdef __Pyx_AsyncGen_USED
}
else
if
(
__Pyx_AsyncGen_CheckExact
(
self
))
{
}
else
if
(
__Pyx_AsyncGen_CheckExact
(
self
))
{
__pyx_
AsyncGenObject
*
agen
=
(
__pyx_
AsyncGenObject
*
)
self
;
__pyx_
PyAsyncGenObject
*
agen
=
(
__pyx_Py
AsyncGenObject
*
)
self
;
PyObject
*
finalizer
=
agen
->
ag_finalizer
;
PyObject
*
finalizer
=
agen
->
ag_finalizer
;
if
(
finalizer
&&
!
agen
->
ag_closed
)
{
if
(
finalizer
&&
!
agen
->
ag_closed
)
{
/* Save the current exception, if any. */
/* Save the current exception, if any. */
...
...
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