mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
python: use Py_TYPE instead of looking directly into PyObject_HEAD
Py_TYPE works on both Python2 and Python3, while internals of PyObject_HEAD have changed. Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com> Acked-by: Wei Liu <wei.liu2@citrix.com>
This commit is contained in:
1 parent
96d1ee6465
commit
7b1e5f7079
2 files changed
+2
-2
No files matched your search
@@ -2670,7 +2670,7 @@ static void PyXc_dealloc(XcObject *self)
|
||||
self->xc_handle = NULL;
|
||||
}
|
||||
|
||||
self->ob_type->tp_free((PyObject *)self);
|
||||
Py_TYPE(self)->tp_free((PyObject *)self);
|
||||
}
|
||||
|
||||
static PyTypeObject PyXcType = {
|
||||
|
||||
@@ -922,7 +922,7 @@ static void xshandle_dealloc(XsHandle *self)
|
||||
|
||||
Py_XDECREF(self->watches);
|
||||
|
||||
self->ob_type->tp_free((PyObject *)self);
|
||||
Py_TYPE(self)->tp_free((PyObject *)self);
|
||||
}
|
||||
|
||||
static PyTypeObject xshandle_type = {
|
||||
|
||||