diff options
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"> |