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
4c48e8d4
Commit
4c48e8d4
authored
Mar 30, 2008
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix enum bug (values weren't forced to ints)
parent
2c056908
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+2
-1
Cython/Compiler/Nodes.py
Cython/Compiler/Nodes.py
+3
-0
No files found.
Cython/Compiler/ExprNodes.py
View file @
4c48e8d4
...
...
@@ -947,7 +947,8 @@ class NameNode(AtomicExprNode):
namespace
,
self
.
entry
.
name
,
code
.
error_goto_if_null
(
self
.
result_code
,
self
.
pos
)))
elif
entry
.
is_local
:
elif
entry
.
is_local
and
False
:
# control flow not good enough yet
assigned
=
entry
.
scope
.
control_flow
.
get_state
((
entry
.
name
,
'initalized'
),
self
.
pos
)
if
assigned
is
False
:
error
(
self
.
pos
,
"local variable '%s' referenced before assignment"
%
entry
.
name
)
...
...
Cython/Compiler/Nodes.py
View file @
4c48e8d4
...
...
@@ -728,6 +728,9 @@ class CEnumDefItemNode(StatNode):
def
analyse_declarations
(
self
,
env
,
enum_entry
):
if
self
.
value
:
self
.
value
.
analyse_const_expression
(
env
)
if
not
self
.
value
.
type
.
is_int
:
self
.
value
=
self
.
value
.
coerce_to
(
PyrexTypes
.
c_int_type
,
env
)
self
.
value
.
analyse_const_expression
(
env
)
value
=
self
.
value
.
result_code
else
:
value
=
self
.
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