Swap keys in proper place

Remove unnecessary clear of the hits
This commit is contained in:
Roman Domrachev 2017-11-14 17:56:30 +03:00
parent 86ca434c93
commit 870defa815

View File

@ -260,12 +260,10 @@ cdef class StringStore:
if self.hits.count(key) != 0:
tmp.push_back(key)
self.keys.swap(tmp)
strings = list(self)
self._reset_and_load(strings)
self.keys.swap(tmp)
self.hits.clear()
cdef const Utf8Str* intern_unicode(self, unicode py_string):
# 0 means missing, but we don't bother offsetting the index.
cdef bytes byte_string = py_string.encode('utf8')