refcounting fix

This commit is contained in:
Wenzel Jakob 2015-09-01 21:38:07 +02:00
parent c47fc488d3
commit 2b0339f44e

View File

@ -62,8 +62,8 @@ private:
/// Chained list of function entries for overloading /// Chained list of function entries for overloading
struct function_entry { struct function_entry {
const char *name = nullptr; const char *name = nullptr;
PyObject * (*impl) (function_entry *, PyObject *, PyObject *, PyObject *); PyObject * (*impl) (function_entry *, PyObject *, PyObject *, PyObject *) = nullptr;
PyMethodDef *def; PyMethodDef *def = nullptr;
void *data = nullptr; void *data = nullptr;
bool is_constructor = false, is_method = false; bool is_constructor = false, is_method = false;
short keywords = 0; short keywords = 0;
@ -316,7 +316,6 @@ private:
while (entry) { while (entry) {
delete entry->def; delete entry->def;
operator delete(entry->data); operator delete(entry->data);
Py_XDECREF(entry->sibling);
function_entry *next = entry->next; function_entry *next = entry->next;
delete entry; delete entry;
entry = next; entry = next;