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
Boxiang Sun
cython
Commits
f070108e
Commit
f070108e
authored
Nov 12, 2010
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix coercion from IntNode to FloatNode, e.g. for hex literals etc.
parent
9ca148be
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+7
-2
No files found.
Cython/Compiler/ExprNodes.py
View file @
f070108e
...
...
@@ -815,8 +815,13 @@ class IntNode(ConstNode):
if
self
.
type
is
dst_type
:
return
self
elif
dst_type
.
is_float
:
float_value
=
float
(
self
.
value
)
return
FloatNode
(
self
.
pos
,
value
=
repr
(
float_value
),
constant_result
=
float_value
)
if
self
.
constant_result
is
not
not_a_constant
:
float_value
=
float
(
self
.
constant_result
)
return
FloatNode
(
self
.
pos
,
value
=
repr
(
float_value
),
type
=
dst_type
,
constant_result
=
float_value
)
else
:
return
FloatNode
(
self
.
pos
,
value
=
self
.
value
,
type
=
dst_type
,
constant_result
=
not_a_constant
)
node
=
IntNode
(
self
.
pos
,
value
=
self
.
value
,
constant_result
=
self
.
constant_result
,
unsigned
=
self
.
unsigned
,
longness
=
self
.
longness
)
if
dst_type
.
is_numeric
and
not
dst_type
.
is_complex
:
...
...
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