diff options
Diffstat (limited to 'Examples/test-suite/ret_by_value.i')
-rw-r--r-- | Examples/test-suite/ret_by_value.i | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Examples/test-suite/ret_by_value.i b/Examples/test-suite/ret_by_value.i new file mode 100644 index 000000000..273336e00 --- /dev/null +++ b/Examples/test-suite/ret_by_value.i @@ -0,0 +1,19 @@ +/* Simple test to check SWIG's handling of return by value */ + +%module ret_by_value + +%warnfilter(801) test; /* Ruby, wrong class name */ + +%inline %{ + +typedef struct { + int myInt; + short myShort; +} test; + +test get_test() { + test myTest = {100, 200}; + return myTest; +} + +%} |