Commit ad29b5b8 authored by Robert Bradshaw's avatar Robert Bradshaw

Fix memleak in cascaded comparisons.

parent e12aaa5d
......@@ -4814,6 +4814,7 @@ class CascadedCmpNode(Node, CmpNode):
def generate_evaluation_code(self, code, result, operand1):
if self.type.is_pyobject:
code.putln("if (__Pyx_PyObject_IsTrue(%s)) {" % result)
code.put_decref(result, self.type)
else:
code.putln("if (%s) {" % result)
self.operand2.generate_evaluation_code(code)
......
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