PageRenderTime 71ms CodeModel.GetById 67ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/trunk/Examples/test-suite/ret_by_value.i

#
Swig | 19 lines | 12 code | 6 blank | 1 comment | 0 complexity | e6ee3353ec5b1ddeeb5e874525c84c9e MD5 | raw file
 1/* Simple test to check SWIG's handling of return by value */
 2
 3%module ret_by_value
 4
 5%warnfilter(SWIGWARN_RUBY_WRONG_NAME) test; /* Ruby, wrong class name */
 6
 7%inline %{
 8
 9typedef struct {
10   int myInt;
11   short myShort;
12} test;
13
14test get_test() {
15    test myTest = {100, 200};
16    return myTest;
17}
18
19%}