projects
/
cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b317d83
)
also pre-calculate the constant result of floats
author
Stefan Behnel
<scoder@users.berlios.de>
Sun, 14 Dec 2008 13:26:48 +0000
(14:26 +0100)
committer
Stefan Behnel
<scoder@users.berlios.de>
Sun, 14 Dec 2008 13:26:48 +0000
(14:26 +0100)
Cython/Compiler/ExprNodes.py
patch
|
blob
|
history
diff --git
a/Cython/Compiler/ExprNodes.py
b/Cython/Compiler/ExprNodes.py
index 85506f50f0d77a839a2653f94f87da2321c51130..fd7a3f727fa2ff90281f1835115edf63b1092d19 100644
(file)
--- a/
Cython/Compiler/ExprNodes.py
+++ b/
Cython/Compiler/ExprNodes.py
@@
-870,6
+870,9
@@
class IntNode(ConstNode):
class FloatNode(ConstNode):
type = PyrexTypes.c_double_type
+ def calculate_constant_result(self):
+ self.constant_result = float(self.value)
+
def compile_time_value(self, denv):
return float(self.value)