aboutsummaryrefslogtreecommitdiffstats
path: root/tests/samplebinding/typesystem_sample.xml
diff options
context:
space:
mode:
authorRenato Filho <renato.filho@openbossa.org>2010-07-27 10:07:18 -0300
committerRenato Filho <renato.filho@openbossa.org>2010-07-27 10:08:29 -0300
commit1b4094837f983d6273a81daffc5bbffedc82cf2c (patch)
treeb780d13e3aa566df6e9287584f96023fb4f71bac /tests/samplebinding/typesystem_sample.xml
parent8a16ff951633c3755cf370228709afaf416b0407 (diff)
Fix char* converter
Fix tests. Created warnning about return last ref of python object. Reviewer: Marcelo Lira <marcelo.lira@openbossa.org> Luciano Wolf <luciano.wolf@openbossa.org>
Diffstat (limited to 'tests/samplebinding/typesystem_sample.xml')
-rw-r--r--tests/samplebinding/typesystem_sample.xml6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/samplebinding/typesystem_sample.xml b/tests/samplebinding/typesystem_sample.xml
index 29e9e601d..77e5052e2 100644
--- a/tests/samplebinding/typesystem_sample.xml
+++ b/tests/samplebinding/typesystem_sample.xml
@@ -10,6 +10,7 @@
<primitive-type name="unsigned char"/>
<primitive-type name="long"/>
<primitive-type name="unsigned long"/>
+ <primitive-type name="std::string"/>
<primitive-type name="Complex" target-lang-api-name="PyComplex">
<conversion-rule file="complex_conversions.h"/>
@@ -754,11 +755,10 @@
</conversion-rule>
<conversion-rule class="target">
- Shiboken::AutoDecRef __object__(PyList_New(count));
+ PyObject *%out = PyList_New(count);
for (int i=0; i &lt; count; i++) {
- PyList_SET_ITEM(__object__.object(), i, %CONVERTTOPYTHON[int](%in[i]));
+ PyList_SET_ITEM(%out, i, %CONVERTTOPYTHON[int](%in[i]));
}
- PyObject *%out = __object__.object();
</conversion-rule>
</modify-argument>