PageRenderTime 45ms CodeModel.GetById 22ms RepoModel.GetById 1ms app.codeStats 0ms

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

#
Swig | 29 lines | 20 code | 5 blank | 4 comment | 0 complexity | 2bc2aa4d0ef706e2b082bd43c7ddef7e MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. /* Swig 1.3.6 does not understand initialization of static class
  2. constants like this. SF Bug #445221, reported by Krzysztof
  3. Kozminski <kozminski@users.sf.net>.
  4. */
  5. %module static_const_member
  6. #if SWIGJAVA
  7. %javaconst(1) EN;
  8. %javaconst(1) CHARTEST;
  9. #elif SWIGCSHARP
  10. %csconst(1) EN;
  11. %csconst(1) CHARTEST;
  12. #elif SWIGD
  13. %dmanifestconst EN;
  14. %dmanifestconst CHARTEST;
  15. #endif
  16. %inline %{
  17. class X {
  18. public:
  19. static const int PN = 0;
  20. static const int CN = 1;
  21. static const int EN = 2;
  22. static const char CHARTEST = 'A';
  23. };
  24. %}