PageRenderTime 38ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

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

#
Swig | 40 lines | 33 code | 7 blank | 0 comment | 0 complexity | bef3c2dddd3335bfd9f1989cb513d5e9 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. %module(naturalvar) naturalvar
  2. #ifdef __cplusplus
  3. %include std_string.i
  4. %inline
  5. {
  6. struct Foo
  7. {
  8. };
  9. Foo f;
  10. std::string s;
  11. struct Bar
  12. {
  13. int i;
  14. Foo f;
  15. std::string s;
  16. };
  17. }
  18. #else
  19. %inline
  20. {
  21. typedef struct _foo
  22. {
  23. }Foo;
  24. Foo f;
  25. char *s;
  26. typedef struct _bar
  27. {
  28. int i;
  29. Foo f;
  30. char *s;
  31. } Bar;
  32. }
  33. #endif