mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-22 05:05:11 +00:00
refcounting fix
This commit is contained in:
parent
c47fc488d3
commit
2b0339f44e
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user