We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4eb3a4c commit f5cb1f0Copy full SHA for f5cb1f0
result.c
@@ -10,6 +10,10 @@
10
#include "pygetdns.h"
11
12
13
+#if !defined(Py_TYPE)
14
+ #define Py_TYPE(ob) (((PyObject *)(ob))->ob_type)
15
+#endif
16
+
17
int
18
result_init(getdns_ResultObject *self, PyObject *args, PyObject *keywds)
19
{
@@ -103,7 +107,9 @@ result_dealloc(getdns_ResultObject *self)
103
107
Py_XDECREF(self->replies_tree);
104
108
Py_XDECREF(self->replies_full);
105
109
Py_XDECREF(self->canonical_name);
106
-#if PY_MAJOR_VERSION < 3
110
+#if PY_MAJOR_VERSION >= 3
111
+ Py_TYPE(self)->tp_free((PyObject *)self);
112
+#else
113
self->ob_type->tp_free((PyObject *)self);
114
#endif
115
}
0 commit comments