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
Xavier Thompson
cython
Commits
12a1d869
Commit
12a1d869
authored
Aug 07, 2017
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor code cleanups
parent
8c6c35bf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
Cython/Utility/Coroutine.c
Cython/Utility/Coroutine.c
+5
-7
No files found.
Cython/Utility/Coroutine.c
View file @
12a1d869
...
...
@@ -210,7 +210,7 @@ static CYTHON_INLINE PyObject *__Pyx_Coroutine_GetAwaitableIter(PyObject *o) {
}
static
void
__Pyx_
_
Coroutine_AwaitableIterError
(
PyObject
*
source
)
{
static
void
__Pyx_Coroutine_AwaitableIterError
(
PyObject
*
source
)
{
#if PY_VERSION_HEX >= 0x03060000 || defined(_PyErr_FormatFromCause)
_PyErr_FormatFromCause
(
PyExc_TypeError
,
...
...
@@ -257,15 +257,13 @@ static PyObject *__Pyx__Coroutine_GetAwaitableIter(PyObject *obj) {
#endif
#if PY_VERSION_HEX >= 0x030500B2 || defined(PyCoro_CheckExact)
if
(
PyCoro_CheckExact
(
obj
))
{
Py_INCREF
(
obj
);
return
obj
;
return
__Pyx_NewRef
(
obj
);
}
else
#endif
#if CYTHON_COMPILING_IN_CPYTHON && defined(CO_ITERABLE_COROUTINE)
if
(
PyGen_CheckExact
(
obj
)
&&
((
PyGenObject
*
)
obj
)
->
gi_code
&&
((
PyCodeObject
*
)((
PyGenObject
*
)
obj
)
->
gi_code
)
->
co_flags
&
CO_ITERABLE_COROUTINE
)
{
// Python generator marked with "@types.coroutine" decorator
Py_INCREF
(
obj
);
return
obj
;
return
__Pyx_NewRef
(
obj
);
}
else
#endif
{
...
...
@@ -286,10 +284,10 @@ static PyObject *__Pyx__Coroutine_GetAwaitableIter(PyObject *obj) {
}
if
(
unlikely
(
!
res
))
{
// surprisingly, CPython replaces the exception here...
__Pyx_
_
Coroutine_AwaitableIterError
(
obj
);
__Pyx_Coroutine_AwaitableIterError
(
obj
);
goto
bad
;
}
if
(
!
PyIter_Check
(
res
))
{
if
(
unlikely
(
!
PyIter_Check
(
res
)
))
{
PyErr_Format
(
PyExc_TypeError
,
"__await__() returned non-iterator of type '%.100s'"
,
Py_TYPE
(
res
)
->
tp_name
);
...
...
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