Commit 85c51e76 authored by Xavier Thompson's avatar Xavier Thompson

Fix cypclass builtin dict __setitem__ refcounting

parent c37bf1b0
......@@ -186,10 +186,8 @@ cdef cypclass cypdict[K, V]:
it = self._indices.find(key)
end = self._indices.end()
if it != end:
Cy_INCREF(key)
Cy_INCREF(value)
index = dereference(it).second
Cy_DECREF(self._items[index].first)
Cy_INCREF(value)
Cy_DECREF(self._items[index].second)
self._items[index].second = value
elif self._active_iterators == 0:
......
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