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
4b711c56
Commit
4b711c56
authored
May 06, 2017
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
include missing utility code when raising StopAsyncIteration
Closes #1692
parent
876a7d33
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
Cython/Compiler/Builtin.py
Cython/Compiler/Builtin.py
+4
-5
Cython/Compiler/Nodes.py
Cython/Compiler/Nodes.py
+2
-0
No files found.
Cython/Compiler/Builtin.py
View file @
4b711c56
...
...
@@ -21,6 +21,7 @@ pyexec_globals_utility_code = UtilityCode.load("PyExecGlobals", "Builtins.c")
globals_utility_code
=
UtilityCode
.
load
(
"Globals"
,
"Builtins.c"
)
builtin_utility_code
=
{
'StopAsyncIteration'
:
UtilityCode
.
load_cached
(
"StopAsyncIteration"
,
"Coroutine.c"
),
}
...
...
@@ -326,6 +327,7 @@ builtin_types_table = [
BuiltinMethod
(
"pop"
,
"T"
,
"O"
,
"PySet_Pop"
)]),
(
"frozenset"
,
"PyFrozenSet_Type"
,
[]),
(
"Exception"
,
"((PyTypeObject*)PyExc_Exception)[0]"
,
[]),
(
"StopAsyncIteration"
,
"((PyTypeObject*)__Pyx_PyExc_StopAsyncIteration)[0]"
,
[]),
]
...
...
@@ -381,6 +383,8 @@ def init_builtin_types():
objstruct_cname
=
None
elif
name
==
'Exception'
:
objstruct_cname
=
"PyBaseExceptionObject"
elif
name
==
'StopAsyncIteration'
:
objstruct_cname
=
"PyBaseExceptionObject"
else
:
objstruct_cname
=
'Py%sObject'
%
name
.
capitalize
()
the_type
=
builtin_scope
.
declare_builtin_type
(
name
,
cname
,
utility
,
objstruct_cname
)
...
...
@@ -407,11 +411,6 @@ def init_builtins():
'__debug__'
,
PyrexTypes
.
c_const_type
(
PyrexTypes
.
c_bint_type
),
pos
=
None
,
cname
=
'(!Py_OptimizeFlag)'
,
is_cdef
=
True
)
entry
=
builtin_scope
.
declare_var
(
'StopAsyncIteration'
,
PyrexTypes
.
py_object_type
,
pos
=
None
,
cname
=
'__Pyx_PyExc_StopAsyncIteration'
)
entry
.
utility_code
=
UtilityCode
.
load_cached
(
"StopAsyncIteration"
,
"Coroutine.c"
)
global
list_type
,
tuple_type
,
dict_type
,
set_type
,
frozenset_type
global
bytes_type
,
str_type
,
unicode_type
,
basestring_type
,
slice_type
global
float_type
,
bool_type
,
type_type
,
complex_type
,
bytearray_type
...
...
Cython/Compiler/Nodes.py
View file @
4b711c56
...
...
@@ -5667,6 +5667,8 @@ class RaiseStatNode(StatNode):
if
self
.
exc_type
:
self
.
exc_type
.
generate_evaluation_code
(
code
)
type_code
=
self
.
exc_type
.
py_result
()
if
self
.
exc_type
.
is_name
:
code
.
globalstate
.
use_entry_utility_code
(
self
.
exc_type
.
entry
)
else
:
type_code
=
"0"
if
self
.
exc_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