PageRenderTime 53ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

/tags/rel-1-3-25/SWIG/Examples/test-suite/name.i

#
Swig | 28 lines | 20 code | 5 blank | 3 comment | 0 complexity | 5f434739cd503e1571a6ed21a1c8c8a3 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. /* This interface file tests whether SWIG/Guile handle the %rename and
  2. %name directives, which was not the case in 1.3a5.
  3. */
  4. %module name
  5. #pragma SWIG nowarn=121 // %name is deprecated. Use %rename instead.
  6. #ifdef SWIGGUILE
  7. %rename foo_1 "foo-2";
  8. #else
  9. %rename foo_1 "foo_2";
  10. #endif
  11. %inline %{
  12. void foo_1() {}
  13. %}
  14. #ifdef SWIGGUILE
  15. %name("bar-2")
  16. #else
  17. %name("bar_2")
  18. #endif
  19. %inline %{
  20. int bar_1 = 17;
  21. %}
  22. %name("Baz_2")
  23. %constant int Baz_1 = 47;