/trunk/Examples/test-suite/ret_by_value.i
Swig | 19 lines | 12 code | 6 blank | 1 comment | 0 complexity | e6ee3353ec5b1ddeeb5e874525c84c9e MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
- /* Simple test to check SWIG's handling of return by value */
- %module ret_by_value
- %warnfilter(SWIGWARN_RUBY_WRONG_NAME) test; /* Ruby, wrong class name */
- %inline %{
- typedef struct {
- int myInt;
- short myShort;
- } test;
- test get_test() {
- test myTest = {100, 200};
- return myTest;
- }
- %}