summaryrefslogtreecommitdiff
path: root/plugins/pyoida
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/pyoida')
-rw-r--r--plugins/pyoida/analysis/py_binary.c5
-rw-r--r--plugins/pyoida/analysis/py_line.c5
-rw-r--r--plugins/pyoida/py_log.c5
3 files changed, 12 insertions, 3 deletions
diff --git a/plugins/pyoida/analysis/py_binary.c b/plugins/pyoida/analysis/py_binary.c
index c8d7446..04d4881 100644
--- a/plugins/pyoida/analysis/py_binary.c
+++ b/plugins/pyoida/analysis/py_binary.c
@@ -71,8 +71,11 @@ pybinary_dealloc(pybinary* self)
//printf("dealloc\n");
+#if PY_VERSION_HEX < 0x03000000
self->ob_type->tp_free((PyObject*)self);
- //Py_TYPE(self)->tp_free((PyObject*)self);
+#else
+ Py_TYPE(self)->tp_free((PyObject*)self);
+#endif
//printf("dealloc::end\n");
diff --git a/plugins/pyoida/analysis/py_line.c b/plugins/pyoida/analysis/py_line.c
index bce8c1e..e981dbe 100644
--- a/plugins/pyoida/analysis/py_line.c
+++ b/plugins/pyoida/analysis/py_line.c
@@ -116,8 +116,11 @@ pyline_dealloc(PyLine *self)
g_object_set_data(G_OBJECT(self->line), "pyline", NULL);
+#if PY_VERSION_HEX < 0x03000000
self->ob_type->tp_free((PyObject*)self);
- //Py_TYPE(self)->tp_free((PyObject*)self);
+#else
+ Py_TYPE(self)->tp_free((PyObject*)self);
+#endif
//printf("dealloc::end\n");
diff --git a/plugins/pyoida/py_log.c b/plugins/pyoida/py_log.c
index 706d626..ea43e5c 100644
--- a/plugins/pyoida/py_log.c
+++ b/plugins/pyoida/py_log.c
@@ -143,8 +143,11 @@ pylog_dealloc(pylog* self)
//printf("dealloc\n");
+#if PY_VERSION_HEX < 0x03000000
self->ob_type->tp_free((PyObject*)self);
- //Py_TYPE(self)->tp_free((PyObject*)self);
+#else
+ Py_TYPE(self)->tp_free((PyObject*)self);
+#endif
//printf("dealloc::end\n");