Commit 92fe0278 authored by Robert Bradshaw's avatar Robert Bradshaw

...

parents 7c69d631 cb6cebbd
...@@ -577,7 +577,7 @@ class BoolNode(PyConstNode): ...@@ -577,7 +577,7 @@ class BoolNode(PyConstNode):
# The constant value True or False # The constant value True or False
def compile_time_value(self, denv): def compile_time_value(self, denv):
return None return self.value
def calculate_result_code(self): def calculate_result_code(self):
if self.value: if self.value:
......
This diff is collapsed.
...@@ -1302,7 +1302,7 @@ def p_IF_statement(s, level, cdef_flag, visibility, api): ...@@ -1302,7 +1302,7 @@ def p_IF_statement(s, level, cdef_flag, visibility, api):
if current_eval: if current_eval:
result = body result = body
if not result: if not result:
result = PassStatNode(pos) result = Nodes.PassStatNode(pos)
s.compile_time_eval = saved_eval s.compile_time_eval = saved_eval
return result return result
......
...@@ -1129,8 +1129,9 @@ static INLINE PY_LONG_LONG __pyx_PyInt_AsLongLong(PyObject* x) { ...@@ -1129,8 +1129,9 @@ static INLINE PY_LONG_LONG __pyx_PyInt_AsLongLong(PyObject* x) {
return PyLong_AsLongLong(x); return PyLong_AsLongLong(x);
} }
else { else {
PY_LONG_LONG val;
PyObject* tmp = PyNumber_Int(x); if (!tmp) return (PY_LONG_LONG)-1; PyObject* tmp = PyNumber_Int(x); if (!tmp) return (PY_LONG_LONG)-1;
PY_LONG_LONG val = __pyx_PyInt_AsLongLong(tmp); val = __pyx_PyInt_AsLongLong(tmp);
Py_DECREF(tmp); Py_DECREF(tmp);
return val; return val;
} }
...@@ -1149,8 +1150,9 @@ static INLINE unsigned PY_LONG_LONG __pyx_PyInt_AsUnsignedLongLong(PyObject* x) ...@@ -1149,8 +1150,9 @@ static INLINE unsigned PY_LONG_LONG __pyx_PyInt_AsUnsignedLongLong(PyObject* x)
return PyLong_AsUnsignedLongLong(x); return PyLong_AsUnsignedLongLong(x);
} }
else { else {
PY_LONG_LONG val;
PyObject* tmp = PyNumber_Int(x); if (!tmp) return (PY_LONG_LONG)-1; PyObject* tmp = PyNumber_Int(x); if (!tmp) return (PY_LONG_LONG)-1;
PY_LONG_LONG val = __pyx_PyInt_AsUnsignedLongLong(tmp); val = __pyx_PyInt_AsUnsignedLongLong(tmp);
Py_DECREF(tmp); Py_DECREF(tmp);
return val; return val;
} }
......
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