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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
fb7cf01b
Commit
fb7cf01b
authored
May 26, 2010
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix large integer literals used in C double context.
parent
db54db2b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+4
-3
No files found.
Cython/Compiler/ExprNodes.py
View file @
fb7cf01b
...
@@ -792,6 +792,8 @@ class IntNode(ConstNode):
...
@@ -792,6 +792,8 @@ class IntNode(ConstNode):
def
coerce_to
(
self
,
dst_type
,
env
):
def
coerce_to
(
self
,
dst_type
,
env
):
if
self
.
type
is
dst_type
:
if
self
.
type
is
dst_type
:
return
self
return
self
elif
dst_type
.
is_float
:
return
FloatNode
(
self
.
pos
,
value
=
repr
(
float
(
self
.
value
)))
node
=
IntNode
(
self
.
pos
,
value
=
self
.
value
,
node
=
IntNode
(
self
.
pos
,
value
=
self
.
value
,
unsigned
=
self
.
unsigned
,
longness
=
self
.
longness
)
unsigned
=
self
.
unsigned
,
longness
=
self
.
longness
)
if
dst_type
.
is_numeric
and
not
dst_type
.
is_complex
:
if
dst_type
.
is_numeric
and
not
dst_type
.
is_complex
:
...
@@ -4991,9 +4993,8 @@ class NumBinopNode(BinopNode):
...
@@ -4991,9 +4993,8 @@ class NumBinopNode(BinopNode):
return
return
if
self
.
type
.
is_complex
:
if
self
.
type
.
is_complex
:
self
.
infix
=
False
self
.
infix
=
False
if
not
self
.
infix
:
self
.
operand1
=
self
.
operand1
.
coerce_to
(
self
.
type
,
env
)
self
.
operand1
=
self
.
operand1
.
coerce_to
(
self
.
type
,
env
)
self
.
operand2
=
self
.
operand2
.
coerce_to
(
self
.
type
,
env
)
self
.
operand2
=
self
.
operand2
.
coerce_to
(
self
.
type
,
env
)
def
compute_c_result_type
(
self
,
type1
,
type2
):
def
compute_c_result_type
(
self
,
type1
,
type2
):
if
self
.
c_types_okay
(
type1
,
type2
):
if
self
.
c_types_okay
(
type1
,
type2
):
...
...
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