diff options
author | Marcelo Lira <marcelo.lira@openbossa.org> | 2011-05-31 12:29:52 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:54:26 -0300 |
commit | f957a6f42d2abf5b33bf2bd9b525731c313cc668 (patch) | |
tree | 4e5a9eeae314ccce3d269fb625147ed831a3b44e /PySide/typesystem_templates.xml | |
parent | c0d6e44accb302ab31694a4efa0c18c13fc997dd (diff) |
Moved internalPointer methods code injection into a code template.
Diffstat (limited to 'PySide/typesystem_templates.xml')
-rw-r--r-- | PySide/typesystem_templates.xml | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/PySide/typesystem_templates.xml b/PySide/typesystem_templates.xml index 8a2628148..3a46c620f 100644 --- a/PySide/typesystem_templates.xml +++ b/PySide/typesystem_templates.xml @@ -272,6 +272,12 @@ %PYARG_0 = PyString_FromString(qPrintable(format)); </template> + <template name="return_internal_pointer"> + %PYARG_0 = reinterpret_cast<PyObject*>(%CPPSELF.%FUNCTION_NAME()); + if (!%PYARG_0) + %PYARG_0 = Py_None; + Py_INCREF(%PYARG_0); + </template> <!-- templates for __reduce__ --> <template name="reduce_code"> |