swig/Examples/test-suite/c
Vadim Zeitlin fd3e763656 Streamline and fix returning objects by value
Remove the code related to "_result_ref" which was confusing and plain
wrong, as it generated something that compiled but crashed during
run-time due to the use of a pointer to an already destroyed stack
object.

Instead, correct the "out" typemap to create a new copy of the object,
which mostly works fine on its own, except that it depends on using
SwigValueWrapper if necessary, so add the call to cplus_value_type()
does this. This also required removing the code resolving typedefs in
the "type" attribute because it confused the base class logic and still
needs an explicit cast to the actual return type due to the use of (and
probable bug in) get_wrapper_func_return_type().

These changes mean that "cppouttype" typemap is not used any longer, so
remove it too.

A couple more tests pass now.
2019-08-06 02:35:25 +02:00
..
abstract_access_runme.c Change naming convention for wrapped ctors and dtor 2016-09-15 01:27:40 +02:00
abstract_change_runme.c Change naming convention for wrapped ctors and dtor 2016-09-15 01:27:40 +02:00
abstract_typedef_runme.c Suppress a warning in abstract_typedef unit test 2016-09-15 01:27:41 +02:00
abstract_virtual_runme.c Change naming convention for wrapped ctors and dtor 2016-09-15 01:27:40 +02:00
add_link_runme.c Change naming convention for wrapped ctors and dtor 2016-09-15 01:27:40 +02:00
anonymous_bitfield_runme.c Change naming convention for wrapped ctors and dtor 2016-09-15 01:27:40 +02:00
c_backend_cpp_exception_runme.c Start removing proxy layer, just use the wrapped functions directly 2016-04-14 02:44:45 +02:00
c_backend_cpp_natural_std_string_runme.c Start removing proxy layer, just use the wrapped functions directly 2016-04-14 02:44:45 +02:00
cast_operator_runme.c Replace SWIG_exit() with just exit() in test code 2019-07-24 20:47:59 +02:00
char_strings_runme.c Replace SWIG_exit() with just exit() in test code 2019-07-24 20:47:59 +02:00
cpp_basic_class_method_runme.c Change naming convention for wrapped ctors and dtor 2016-09-15 01:27:40 +02:00
cpp_basic_class_runme.c Change naming convention for wrapped ctors and dtor 2016-09-15 01:27:40 +02:00
cpp_basic_class_var_pub_member_built_in_runme.c Change naming convention for wrapped ctors and dtor 2016-09-15 01:27:40 +02:00
cpp_basic_class_var_pub_member_class_runme.c Change naming convention for wrapped ctors and dtor 2016-09-15 01:27:40 +02:00
cpp_basic_class_virtual_method_runme.c Change naming convention for wrapped ctors and dtor 2016-09-15 01:27:40 +02:00
cpp_basic_global_var_class_runme.c Use wrapper functions for global variables of non-C types 2016-04-20 18:45:42 +02:00
cpp_basic_namespaced_class_runme.c Change naming convention for wrapped ctors and dtor 2016-09-15 01:27:40 +02:00
cpp_basic_runme.c Change naming convention for wrapped ctors and dtor 2016-09-15 01:27:40 +02:00
cpp_basic_template_class_runme.c Change naming convention for wrapped ctors and dtor 2016-09-15 01:27:40 +02:00
cpp_basic_template_function_runme.c Allow to use the original name of the global functions 2016-04-21 01:37:42 +02:00
cpp_enum_runme.c Change naming convention for wrapped ctors and dtor 2016-09-15 01:27:40 +02:00
enums_runme.c Replace SWIG_exit() with just exit() in test code 2019-07-24 20:47:59 +02:00
exception_order_runme.c Replace SWIG_exit() with just exit() in test code 2019-07-24 20:47:59 +02:00
global_vars_runme.c Fix warning about undeclared strcmp() in a unit test 2019-08-04 17:47:36 +02:00
Makefile.in Streamline and fix returning objects by value 2019-08-06 02:35:25 +02:00
operator_overload_runme.c Replace SWIG_exit() with just exit() in test code 2019-07-24 20:47:59 +02:00