diff options
author | Lauro Neto <lauro.neto@openbossa.org> | 2010-08-09 14:23:35 -0300 |
---|---|---|
committer | renatofilho <renato.filho@openbossa.org> | 2010-10-13 13:41:03 -0300 |
commit | 24fcb55072c9e9db0215e0268202e4e14f55195f (patch) | |
tree | ea0894ce89eed546f3ebf8ee584d858690c3a604 /PySide/typesystem_templates.xml | |
parent | 646850ee7b92b4c6d25de04583bcc52a4f122e1e (diff) |
Add templates for __reduce__ functions.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
Renato Filho <renato.filho@openbossa.org>
Diffstat (limited to 'PySide/typesystem_templates.xml')
-rw-r--r-- | PySide/typesystem_templates.xml | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/PySide/typesystem_templates.xml b/PySide/typesystem_templates.xml index 959fe7e20..e9db3289a 100644 --- a/PySide/typesystem_templates.xml +++ b/PySide/typesystem_templates.xml @@ -181,11 +181,18 @@ %RETURN_TYPE retval_ = %CPPSELF.%FUNCTION_NAME(%1, %2, %3, %4, %5); %PYARG_0 = Shiboken::makeTuple(retval_, %4); </template> - <template name="set_qapp_parent_for_orphan"> Shiboken::SbkBaseWrapper* _pySelf = reinterpret_cast<Shiboken::SbkBaseWrapper*>(%PYARG_0); if (!_pySelf->parentInfo) Shiboken::setParent(%CONVERTTOPYTHON[QApplication*](qApp), %PYARG_0); </template> + <!-- templates for __reduce__ --> + <template name="reduce_start"> + PyObject *type = PyObject_Type(%PYSELF); + PyObject *args = NULL; + </template> + <template name="reduce_finish"> + %PYARG_0 = Py_BuildValue("(OO)", type, args); + </template> </typesystem> |