Commit e6703967 authored by Vitja Makarov's avatar Vitja Makarov

NameNode.generate_deletion_code use cf-hints

parent 25301fc9
...@@ -1693,10 +1693,10 @@ class NameNode(AtomicExprNode): ...@@ -1693,10 +1693,10 @@ class NameNode(AtomicExprNode):
elif self.entry.type.is_pyobject: elif self.entry.type.is_pyobject:
if not self.cf_is_null: if not self.cf_is_null:
if self.cf_maybe_null: if self.cf_maybe_null:
code.put_xdecref(self.result(), self.ctype()) code.putln('if (%s == 0) { PyErr_SetString(PyExc_UnboundLocalError, "%s"); %s }' %
else: (self.entry.cname, self.entry.name, code.error_goto(self.pos)))
code.put_decref(self.result(), self.ctype()) code.put_decref(self.result(), self.ctype())
code.putln('%s = NULL;' % self.result()) code.putln('%s = NULL;' % self.result())
else: else:
error(self.pos, "Deletion of C names not supported") error(self.pos, "Deletion of C names not supported")
......
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