PageRenderTime 34ms CodeModel.GetById 8ms RepoModel.GetById 0ms 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
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. /* Simple test to check SWIG's handling of return by value */
  2. %module ret_by_value
  3. %warnfilter(SWIGWARN_RUBY_WRONG_NAME) test; /* Ruby, wrong class name */
  4. %inline %{
  5. typedef struct {
  6. int myInt;
  7. short myShort;
  8. } test;
  9. test get_test() {
  10. test myTest = {100, 200};
  11. return myTest;
  12. }
  13. %}