summaryrefslogtreecommitdiffstats
path: root/tests/samplebinding/typesystem_sample.xml
diff options
context:
space:
mode:
authorLuciano Wolf <luciano.wolf@openbossa.org>2010-09-13 16:16:40 -0300
committerLuciano Wolf <luciano.wolf@openbossa.org>2010-09-13 19:34:30 -0300
commit58692e4b27957b587a9b8bd5075fbcb0daad7998 (patch)
tree3b1d954e67482c468ca64e7a642759309330fa3b /tests/samplebinding/typesystem_sample.xml
parentc3059779d7628fdbb140ed02cdc0cc7ca80e7ad8 (diff)
downloadshiboken-58692e4b27957b587a9b8bd5075fbcb0daad7998.tar.gz
shiboken-58692e4b27957b587a9b8bd5075fbcb0daad7998.tar.xz
shiboken-58692e4b27957b587a9b8bd5075fbcb0daad7998.zip
Fix code generation for modified constructors.
Reviewers: Renato Ara├║jo <renato.filho@openbossa.org> Hugo Parente Lima <hugo.pl@gmail.com>
Diffstat (limited to 'tests/samplebinding/typesystem_sample.xml')
-rw-r--r--tests/samplebinding/typesystem_sample.xml11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/samplebinding/typesystem_sample.xml b/tests/samplebinding/typesystem_sample.xml
index 7b02a4d3..de262c9e 100644
--- a/tests/samplebinding/typesystem_sample.xml
+++ b/tests/samplebinding/typesystem_sample.xml
@@ -123,6 +123,17 @@
<object-type name="Derived" polymorphic-id-expression="%1->type() == Derived::TpDerived" />
<value-type name="Derived::SomeInnerClass" />
+ <object-type name="ModifiedConstructor">
+ <modify-function signature="ModifiedConstructor(int)">
+ <modify-argument index="1">
+ <replace-type modified-type="PyString"/>
+ </modify-argument>
+ <inject-code class='target' position='beginning'>
+ %0 = new %FUNCTION_NAME(atoi(%CONVERTTOCPP[const char *](%PYARG_1)));
+ </inject-code>
+ </modify-function>
+ </object-type>
+
<object-type name="ObjectType" hash-function="objectTypeHash">
<!-- rename function to avoid Python signature conflit -->
<modify-function signature="setObject(const Null&amp;)" rename="setNullObject" />