diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2009-11-18 22:48:34 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2009-11-18 22:48:34 (GMT) |
commit | 51e5dac69a78930fb05ccd8d9cfe59b9cd51c03a (patch) | |
tree | 0b1e8b8b656296135c80251ff5b035abf38345f0 | |
parent | 3b1b7cd7a3b7b36d2937e13437519e951668a995 (diff) |
Adapted code for supporting Python 3.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@135 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | plugins/pyoida/analysis/py_binary.c | 5 | ||||
-rw-r--r-- | plugins/pyoida/analysis/py_line.c | 5 | ||||
-rw-r--r-- | plugins/pyoida/py_log.c | 5 |
4 files changed, 19 insertions, 3 deletions
@@ -1,3 +1,10 @@ +09-10-31 Cyrille Bagard <nocbos@gmail.com> + + * plugins/pyoida/analysis/py_binary.c: + * plugins/pyoida/analysis/py_line.c: + * plugins/pyoida/py_log.c: + Adapt code for supporting Python 3. + 09-10-29 Cyrille Bagard <nocbos@gmail.com> * src/analysis/exporter.c: 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"); |