summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLauro Neto <lauro.neto@openbossa.org>2010-08-09 14:23:35 -0300
committerrenatofilho <renato.filho@openbossa.org>2010-10-13 13:41:03 -0300
commit24fcb55072c9e9db0215e0268202e4e14f55195f (patch)
treeea0894ce89eed546f3ebf8ee584d858690c3a604
parent646850ee7b92b4c6d25de04583bcc52a4f122e1e (diff)
downloadpyside-24fcb55072c9e9db0215e0268202e4e14f55195f.tar.gz
pyside-24fcb55072c9e9db0215e0268202e4e14f55195f.tar.xz
pyside-24fcb55072c9e9db0215e0268202e4e14f55195f.zip
Add templates for __reduce__ functions.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org> Renato Filho <renato.filho@openbossa.org>
-rw-r--r--PySide/typesystem_templates.xml9
1 files changed, 8 insertions, 1 deletions
diff --git a/PySide/typesystem_templates.xml b/PySide/typesystem_templates.xml
index 959fe7e..e9db328 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&lt;Shiboken::SbkBaseWrapper*&gt;(%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>