Commit 1a6cfa09 authored by Robert Bradshaw's avatar Robert Bradshaw

merge

parents 2bd035ea e692110d
......@@ -3390,6 +3390,8 @@ class DelStatNode(StatNode):
self.gil_check(env)
elif arg.type.is_ptr and arg.type.base_type.is_cpp_class:
pass
elif arg.type.is_cpp_class:
error(arg.pos, "Deletion of non-heap C++ object")
else:
error(arg.pos, "Deletion of non-Python, non-C++ object")
#arg.release_target_temp(env)
......@@ -3402,7 +3404,7 @@ class DelStatNode(StatNode):
arg.generate_deletion_code(code)
elif arg.type.is_ptr and arg.type.base_type.is_cpp_class:
arg.generate_result_code()
code.putln("delete %s" % arg.result())
code.putln("delete %s;" % arg.result())
# else error reported earlier
def annotate(self, code):
......
......@@ -27,6 +27,7 @@ cpdef p_typecast(PyrexScanner s)
cpdef p_sizeof(PyrexScanner s)
cpdef p_yield_expression(PyrexScanner s)
cpdef p_power(PyrexScanner s)
cpdef p_new_expr(PyrexScanner s)
cpdef p_trailer(PyrexScanner s, node1)
cpdef p_call(PyrexScanner s, function)
cpdef p_index(PyrexScanner s, base)
......
......@@ -12,7 +12,6 @@ class TestDecorator(TransformTest):
def decorated():
pass
""")
self.assertCode(u"""
def decorator(fun):
return fun
......
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