python: fix successive deref on cython object

This commit is contained in:
Simon Désaulniers authored and Adrien Béraud committed 2016-06-07 11:46:24 -04:00
1 parent a47710b871
commit 99fbf5d8a0
1 file changed
+1 -1
+1 -1
View File
@@ -49,7 +49,6 @@ cdef inline void lookup_callback(cpp.vector[cpp.shared_ptr[cpp.IndexValue]]* val
v._value = val
vals.append(v)
cbs['lookup'](vals, p.toString())
ref.Py_DECREF(cbs)
cdef inline void shutdown_callback(void* user_data) with gil:
cbs = <object>user_data
@@ -434,6 +433,7 @@ cdef class Pht(object):
done_cb -- Called when the operation is completed.
"""
cb_obj = {'done':done_cb}
ref.Py_INCREF(cb_obj)
cdef cpp.IndexKey cppk
for kk, v in key.items():
cppk[bytes(kk, 'utf-8')] = cpp.Prefix(bytes(v))