Commit ac8ccd0c authored by Xavier Thompson's avatar Xavier Thompson

Decrement CyObject after automatic arg conversion in defnode wrapper

parent 8ce7c6d5
......@@ -3671,6 +3671,9 @@ class DefNodeWrapper(FuncDefNode):
code.put_var_xdecref(entry)
else:
code.put_var_decref(entry)
elif entry.is_arg and entry.type.is_cyp_class:
# the conversion from PyObject to CyObject creates a new CyObject reference
code.put_cyxdecref(entry.cname)
code.put_finish_refcount_context()
if not self.return_type.is_void:
......
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