summaryrefslogtreecommitdiffstats
path: root/tests/samplebinding/typesystem_sample.xml
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2010-12-16 14:08:29 -0300
committerMarcelo Lira <marcelo.lira@openbossa.org>2010-12-16 14:38:04 -0300
commit2d146fad966ae24940c65812cde4c28b645ecf6b (patch)
tree08267561ce65de16fc422d59f2dceaadfd4309f9 /tests/samplebinding/typesystem_sample.xml
parentf728e59aa228d5b796b5641bea683333b10919e4 (diff)
downloadshiboken-2d146fad966ae24940c65812cde4c28b645ecf6b.tar.gz
shiboken-2d146fad966ae24940c65812cde4c28b645ecf6b.tar.xz
shiboken-2d146fad966ae24940c65812cde4c28b645ecf6b.zip
Added tests to check the release of ownership of objects returned from Python.
The ObjectModel test class was introduced to check if the transference of ownership of objects returned from Python to C++ through a virtual method is working properly. Also updated the other test that uses the ObjectView class. Reviewed by Lauro Moura <lauro.neto@openbossa.org> Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
Diffstat (limited to 'tests/samplebinding/typesystem_sample.xml')
-rw-r--r--tests/samplebinding/typesystem_sample.xml9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/samplebinding/typesystem_sample.xml b/tests/samplebinding/typesystem_sample.xml
index ba58c5f2..ae6f61b9 100644
--- a/tests/samplebinding/typesystem_sample.xml
+++ b/tests/samplebinding/typesystem_sample.xml
@@ -236,13 +236,20 @@
</object-type>
<object-type name="ObjectView">
- <modify-function signature="setModel(ObjectType*)">
+ <modify-function signature="setModel(ObjectModel*)">
<modify-argument index="1">
<reference-count action="add"/>
</modify-argument>
</modify-function>
</object-type>
+ <object-type name="ObjectModel">
+ <modify-function signature="data() const">
+ <modify-argument index="return">
+ <define-ownership class="native" owner="c++"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
<value-type name="Event">
<enum-type name="EventType"/>