From fc635bdc0a32888745d4428e6e033da7a9afbc7c Mon Sep 17 00:00:00 2001 From: Marcelo Lira Date: Mon, 22 Mar 2010 17:22:37 -0300 Subject: Adds tests to type system modifications regarding reference to pointer type. Reviewed by Hugo Parente Reviewed by Lauro Moura --- tests/samplebinding/typesystem_sample.xml | 44 +++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) (limited to 'tests/samplebinding/typesystem_sample.xml') diff --git a/tests/samplebinding/typesystem_sample.xml b/tests/samplebinding/typesystem_sample.xml index eabc413f9..14ce1e18a 100644 --- a/tests/samplebinding/typesystem_sample.xml +++ b/tests/samplebinding/typesystem_sample.xml @@ -584,6 +584,50 @@ PyObject_Call(%PYTHON_METHOD_OVERRIDE, %PYTHON_ARGUMENTS, NULL); + + + + + + + + AutoDecRef _py_ok_(PySequence_GetItem(%PYARG_0, 0)); + AutoDecRef _py_ret_(PySequence_GetItem(%PYARG_0, 1)); + %RETURN_TYPE %out = %CONVERTTOCPP[%RETURN_TYPE](_py_ok_); + %2 = %CONVERTTOCPP[Str*](_py_ret_); + + + + Str* _str_arg_ = 0; + %RETURN_TYPE %0 = %CPPSELF.%TYPE::%FUNCTION_NAME(%1, _str_arg_); + + + %PYARG_0 = PyTuple_New(2); + PyObject* _item_ = %CONVERTTOPYTHON[%RETURN_TYPE](%0); + PyTuple_SET_ITEM(%PYARG_0, 0, _item_); + _item_ = %CONVERTTOPYTHON[Str*](_str_arg_); + PyTuple_SET_ITEM(%PYARG_0, 1, _item_); + + + + + + + + + + + Str* _str_arg_ = 0; + %RETURN_TYPE %0 = %CPPSELF.%FUNCTION_NAME(%1, _str_arg_); + + + %PYARG_0 = PyTuple_New(2); + PyObject* _item_ = %CONVERTTOPYTHON[%RETURN_TYPE](%0); + PyTuple_SET_ITEM(%PYARG_0, 0, _item_); + _item_ = %CONVERTTOPYTHON[Str*](_str_arg_); + PyTuple_SET_ITEM(%PYARG_0, 1, _item_); + + -- cgit v1.2.3