Commit 277f0c23 authored by Xavier Thompson's avatar Xavier Thompson

Remove obsolete manual cypclass refcounting from unit tests with templated code

parent 031ddf9a
...@@ -30,7 +30,6 @@ cdef cypclass BasicQueue(ActhonQueueInterface) checklock: ...@@ -30,7 +30,6 @@ cdef cypclass BasicQueue(ActhonQueueInterface) checklock:
self._queue.push_back(message) self._queue.push_back(message)
if message._sync_method is not NULL: if message._sync_method is not NULL:
message._sync_method.insertActivity(message) message._sync_method.insertActivity(message)
Cy_INCREF(message)
bint activate(self): bint activate(self):
cdef bint one_message_processed cdef bint one_message_processed
...@@ -52,7 +51,6 @@ cdef cypclass BasicQueue(ActhonQueueInterface) checklock: ...@@ -52,7 +51,6 @@ cdef cypclass BasicQueue(ActhonQueueInterface) checklock:
else: else:
self._queue.push_back(next_message) self._queue.push_back(next_message)
# Don't forget to incref to avoid premature deallocation # Don't forget to incref to avoid premature deallocation
Cy_INCREF(next_message)
return one_message_processed return one_message_processed
cdef cypclass NoneResult(ActhonResultInterface) checklock: cdef cypclass NoneResult(ActhonResultInterface) checklock:
......
...@@ -23,8 +23,6 @@ cdef cypclass SingleInsertionDict[K, V]: ...@@ -23,8 +23,6 @@ cdef cypclass SingleInsertionDict[K, V]:
end = self._indices.end() end = self._indices.end()
if it == end: if it == end:
Cy_INCREF(key)
Cy_INCREF(value)
self._indices[key] = self._items.size() self._indices[key] = self._items.size()
self._items.push_back((key, value)) self._items.push_back((key, value))
else: else:
...@@ -46,8 +44,6 @@ cdef cypclass SingleInsertionDict[K, V]: ...@@ -46,8 +44,6 @@ cdef cypclass SingleInsertionDict[K, V]:
if it != end: if it != end:
index = deref(it).second index = deref(it).second
Cy_DECREF(self._items[index][0])
Cy_DECREF(self._items[index][1])
self._indices.erase(it) self._indices.erase(it)
if index < self._items.size() - 1: if index < self._items.size() - 1:
self._items[index] = self._items[self._indices.size() - 1] self._items[index] = self._items[self._indices.size() - 1]
......
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