Commit 920a8f1a authored by Robert Bradshaw's avatar Robert Bradshaw

cpdef cleanup (for safety)

parent 245461ee
...@@ -1920,9 +1920,7 @@ class OverrideCheckNode(StatNode): ...@@ -1920,9 +1920,7 @@ class OverrideCheckNode(StatNode):
function=self.func_node, function=self.func_node,
args=[ExprNodes.NameNode(self.pos, name=arg.name) for arg in self.args[first_arg:]]) args=[ExprNodes.NameNode(self.pos, name=arg.name) for arg in self.args[first_arg:]])
self.body = ReturnStatNode(self.pos, value=call_node) self.body = ReturnStatNode(self.pos, value=call_node)
# self.func_temp = env.allocate_temp_pyobject()
self.body.analyse_expressions(env) self.body.analyse_expressions(env)
# env.release_temp(self.func_temp)
def generate_execution_code(self, code): def generate_execution_code(self, code):
# Check to see if we are an extension type # Check to see if we are an extension type
...@@ -1946,7 +1944,7 @@ class OverrideCheckNode(StatNode): ...@@ -1946,7 +1944,7 @@ class OverrideCheckNode(StatNode):
code.putln('if (!%s || %s) {' % (is_builtin_function_or_method, is_overridden)) code.putln('if (!%s || %s) {' % (is_builtin_function_or_method, is_overridden))
self.body.generate_execution_code(code) self.body.generate_execution_code(code)
code.putln('}') code.putln('}')
code.put_decref(self.func_node.result_code, PyrexTypes.py_object_type) code.put_decref_clear(self.func_node.result_code, PyrexTypes.py_object_type)
code.putln("}") code.putln("}")
class ClassDefNode(StatNode, BlockNode): class ClassDefNode(StatNode, BlockNode):
......
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