aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGianni Tedesco <gianni.tedesco@citrix.com>2011-01-11 18:57:16 +0000
committerGianni Tedesco <gianni.tedesco@citrix.com>2011-01-11 18:57:16 +0000
commita1744733176ff3d3a1d37a0e6d7c060bd96ba9a3 (patch)
tree7513af1b8ca72589f6b0821b4f57ed49a5506bab
parente1d9a99f18cb38689a05d9bd02ae269885f6019c (diff)
downloadxen-a1744733176ff3d3a1d37a0e6d7c060bd96ba9a3.tar.gz
xen-a1744733176ff3d3a1d37a0e6d7c060bd96ba9a3.tar.bz2
xen-a1744733176ff3d3a1d37a0e6d7c060bd96ba9a3.zip
tools/python/pyxl: Allow subclassing of auto-generated python types
Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
-rw-r--r--tools/python/genwrap.py2
-rw-r--r--tools/python/xen/lowlevel/xl/xl.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/tools/python/genwrap.py b/tools/python/genwrap.py
index fd2d39dd6e..314e39dacf 100644
--- a/tools/python/genwrap.py
+++ b/tools/python/genwrap.py
@@ -151,7 +151,7 @@ static PyTypeObject Py%s_Type= {
NULL, /* tp_getattro */
NULL, /* tp_setattro */
NULL, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT, /* tp_flags */
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
"%s", /* tp_doc */
NULL, /* tp_traverse */
NULL, /* tp_clear */
diff --git a/tools/python/xen/lowlevel/xl/xl.c b/tools/python/xen/lowlevel/xl/xl.c
index 9b47153f73..9b5dcd3cd7 100644
--- a/tools/python/xen/lowlevel/xl/xl.c
+++ b/tools/python/xen/lowlevel/xl/xl.c
@@ -628,7 +628,7 @@ static PyTypeObject PyXlType = {
NULL, /* tp_getattro */
NULL, /* tp_setattro */
NULL, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT, /* tp_flags */
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
"libxenlight connection", /* tp_doc */
NULL, /* tp_traverse */
NULL, /* tp_clear */