aboutsummaryrefslogtreecommitdiffstats
path: root/PySide/typesystem_templates.xml
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2010-12-21 12:17:56 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:48:01 -0300
commit3f0291dfe49cdf15325600aba362a0fc5662d19d (patch)
tree356c67fba53d3f5d61568227d60eef10a4d0ec46 /PySide/typesystem_templates.xml
parent7771798cf27896c43054699c5f53468cd8bf14cf (diff)
Fixed global functions from QT_TR_NOOP and QT_TRANSLATE_NOOP family.
These function just return one of their arguments as result, and the buggy implementation was forgetting to increment the reference count for the returned object. A new unit test was added. Reviewed by Hugo Parente <hugo.lima@openbossa.org> Reviewed by Renato Araújo <renato.filho@openbossa.org>
Diffstat (limited to 'PySide/typesystem_templates.xml')
-rw-r--r--PySide/typesystem_templates.xml6
1 files changed, 6 insertions, 0 deletions
diff --git a/PySide/typesystem_templates.xml b/PySide/typesystem_templates.xml
index 9d39bb481..4604fda95 100644
--- a/PySide/typesystem_templates.xml
+++ b/PySide/typesystem_templates.xml
@@ -238,5 +238,11 @@
return %CONVERTTOPYTHON[%TRANSPOSED_TYPE](%CPPSELF.transposed());
</template>
+ <!-- Replace '#' for the argument number you want. -->
+ <template name="return_argument">
+ Py_INCREF(%PYARG_#);
+ %PYARG_0 = %PYARG_#;
+ </template>
+
</typesystem>