diff options
author | Marcelo Lira <marcelo.lira@openbossa.org> | 2011-12-01 17:35:02 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:18:33 -0300 |
commit | aac5c3cd8f1476e60caa4da9aabef8a2a91b9bcd (patch) | |
tree | 6bf2dd1642097666cda6824b3f3a65ea265937c2 /tests/samplebinding | |
parent | 2e39ac022309a4d88f31d5f6ca7c6319a31fa6b3 (diff) |
Remove occurrences of Shiboken::makeTuple from test bindings.
Diffstat (limited to 'tests/samplebinding')
-rw-r--r-- | tests/samplebinding/typesystem_sample.xml | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/tests/samplebinding/typesystem_sample.xml b/tests/samplebinding/typesystem_sample.xml index b2b795aa8..d1e4d1b21 100644 --- a/tests/samplebinding/typesystem_sample.xml +++ b/tests/samplebinding/typesystem_sample.xml @@ -1193,8 +1193,12 @@ </modify-argument> <inject-code class="target" position="beginning"> ObjectType* tmpObject = 0; + %BEGIN_ALLOW_THREADS %RETURN_TYPE %0 = %CPPSELF.%FUNCTION_NAME(&tmpObject); - %PYARG_0 = Shiboken::makeTuple(%0, tmpObject); + %END_ALLOW_THREADS + %PYARG_0 = PyTuple_New(2); + PyTuple_SET_ITEM(%PYARG_0, 0, %CONVERTTOPYTHON[%RETURN_TYPE](%0)); + PyTuple_SET_ITEM(%PYARG_0, 1, %CONVERTTOPYTHON[ObjectType*](tmpObject)); </inject-code> </modify-function> <modify-function signature="passOddBool(OddBool)" rename="invertBoolean"> @@ -1337,11 +1341,15 @@ </inject-code> </modify-function> <template name="fix_int*,int*,int*,int*"> - int a0, a1, a2, a3; - %BEGIN_ALLOW_THREADS - %CPPSELF->::%TYPE::%FUNCTION_NAME(&a0, &a1, &a2, &a3); - %END_ALLOW_THREADS - %PYARG_0 = Shiboken::makeTuple(a0, a1, a2, a3); + int a0, a1, a2, a3; + %BEGIN_ALLOW_THREADS + %CPPSELF->::%TYPE::%FUNCTION_NAME(&a0, &a1, &a2, &a3); + %END_ALLOW_THREADS + %PYARG_0 = PyTuple_New(4); + PyTuple_SET_ITEM(%PYARG_0, 0, %CONVERTTOPYTHON[int](a0)); + PyTuple_SET_ITEM(%PYARG_0, 1, %CONVERTTOPYTHON[int](a1)); + PyTuple_SET_ITEM(%PYARG_0, 2, %CONVERTTOPYTHON[int](a2)); + PyTuple_SET_ITEM(%PYARG_0, 3, %CONVERTTOPYTHON[int](a3)); </template> <template name="fix_native_return_int*,int*,int*,int*"> PyObject* _obj = %PYARG_0.object(); |