Commit b5f931ec authored by Vitja Makarov's avatar Vitja Makarov

Do XDECREF when init_to_none is 0 or False

parent d6ea037c
......@@ -1290,10 +1290,10 @@ class CCodeWriter(object):
def put_var_decref(self, entry):
if entry.type.is_pyobject:
if entry.init_to_none is False: # FIXME: 0 and False are treated differently???
self.putln("__Pyx_XDECREF(%s);" % self.entry_as_pyobject(entry))
else:
if entry.init_to_none:
self.putln("__Pyx_DECREF(%s);" % self.entry_as_pyobject(entry))
else:
self.putln("__Pyx_XDECREF(%s);" % self.entry_as_pyobject(entry))
def put_var_decref_clear(self, entry):
if entry.type.is_pyobject:
......
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