aboutsummaryrefslogtreecommitdiffstats
path: root/PySide/typesystem_templates.xml
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2010-03-23 12:54:14 -0300
committerMarcelo Lira <marcelo.lira@openbossa.org>2010-03-23 14:36:19 -0300
commit1e1c83886edee5c4d83a69e9414becc8f0bd47a7 (patch)
tree5a9e600797093359dcd8ba60718c76124bea6f78 /PySide/typesystem_templates.xml
parentd38e0155185d0c691e22387e5b2fb22b114bf324 (diff)
Updates to QtXml module.
Fixes many classes, in particular: QXmlDefaultHandler, QXmlContentHandler, QXmlEntityResolver, QXmlReader and QXmlSimpleReader. A new type system template was added to handle virtual methods that must convert a (result, bool ok) tuple returned from a Python override into a single C++ result value and set a C++ bool* argument.
Diffstat (limited to 'PySide/typesystem_templates.xml')
-rw-r--r--PySide/typesystem_templates.xml8
1 files changed, 8 insertions, 0 deletions
diff --git a/PySide/typesystem_templates.xml b/PySide/typesystem_templates.xml
index 495bc6117..b60757591 100644
--- a/PySide/typesystem_templates.xml
+++ b/PySide/typesystem_templates.xml
@@ -125,5 +125,13 @@
_ret = %CPPSELF.%FUNCTION_NAME(%ARGUMENT_NAMES, &amp;_arg);
%PYARG_0 = Shiboken::makeTuple(_ret, _arg);
</template>
+
+ <template name="fix_virtual_method_return_value_and_bool*">
+ AutoDecRef _py_ret_(PySequence_GetItem(%PYARG_0, 0));
+ AutoDecRef _py_ok_(PySequence_GetItem(%PYARG_0, 1));
+ %RETURN_TYPE %out = %CONVERTTOCPP[%RETURN_TYPE](_py_ret_);
+ *%2 = %CONVERTTOCPP[bool](_py_ok_);
+ </template>
+
</typesystem>