Commit 9262420f authored by Dag Sverre Seljebotn's avatar Dag Sverre Seljebotn

Fixed bug with BoolNode result_code

parent c3676b48
...@@ -628,7 +628,7 @@ class BoolNode(ConstNode): ...@@ -628,7 +628,7 @@ class BoolNode(ConstNode):
return self.value return self.value
def calculate_result_code(self): def calculate_result_code(self):
return int(self.value) return str(int(self.value))
class NullNode(ConstNode): class NullNode(ConstNode):
type = PyrexTypes.c_null_ptr_type type = PyrexTypes.c_null_ptr_type
......
"""
>>> call_test()
False
True
False
True
True
True
True
"""
cdef test(bint value):
print value
def call_test():
test(False)
test(True)
test(0)
test(234)
test(-1)
x = True
test(x)
x = 3242
test(x)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment