debuggers.hg
changeset 22775:659ffaf66e88
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>
Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
author | Gianni Tedesco <gianni.tedesco@citrix.com> |
---|---|
date | Tue Jan 11 18:57:16 2011 +0000 (2011-01-11) |
parents | f80eeb755b15 |
children | aa3d665e3bb7 |
files | tools/python/genwrap.py tools/python/xen/lowlevel/xl/xl.c |
line diff
1.1 --- a/tools/python/genwrap.py Tue Jan 11 18:56:48 2011 +0000 1.2 +++ b/tools/python/genwrap.py Tue Jan 11 18:57:16 2011 +0000 1.3 @@ -151,7 +151,7 @@ static PyTypeObject Py%s_Type= { 1.4 NULL, /* tp_getattro */ 1.5 NULL, /* tp_setattro */ 1.6 NULL, /* tp_as_buffer */ 1.7 - Py_TPFLAGS_DEFAULT, /* tp_flags */ 1.8 + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ 1.9 "%s", /* tp_doc */ 1.10 NULL, /* tp_traverse */ 1.11 NULL, /* tp_clear */
2.1 --- a/tools/python/xen/lowlevel/xl/xl.c Tue Jan 11 18:56:48 2011 +0000 2.2 +++ b/tools/python/xen/lowlevel/xl/xl.c Tue Jan 11 18:57:16 2011 +0000 2.3 @@ -628,7 +628,7 @@ static PyTypeObject PyXlType = { 2.4 NULL, /* tp_getattro */ 2.5 NULL, /* tp_setattro */ 2.6 NULL, /* tp_as_buffer */ 2.7 - Py_TPFLAGS_DEFAULT, /* tp_flags */ 2.8 + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ 2.9 "libxenlight connection", /* tp_doc */ 2.10 NULL, /* tp_traverse */ 2.11 NULL, /* tp_clear */