/tags/rel-1-3-26/SWIG/Examples/test-suite/imports_b.i

# · Swig · 42 lines · 10 code · 6 blank · 26 comment · 0 complexity · afafb77f781f1e14feb7374bc8ec9143 MD5 · raw file

  1. /* This file is part of a test for SF bug #231619.
  2. It shows that the %import directive does not work properly in SWIG
  3. 1.3a5: Type information is not properly generated if a base class
  4. comes from an %import-ed file.
  5. Extra tests added for enums to test languages that have enum types.
  6. */
  7. %module imports_b
  8. %{
  9. #include "imports_b.h"
  10. %}
  11. /*
  12. To import, you can use either
  13. %import "imports_a.i"
  14. or
  15. %import(module="imports_a") "imports_a.h"
  16. In the first case, imports_a.i should declare the module name using
  17. the %module directive.
  18. In the second case, the file could be either a .h file, where no
  19. %module directive will be found, or a swig interface file, where
  20. the module option will take priority over any %module directive
  21. inside the imported file.
  22. */
  23. #if 0
  24. %import "imports_a.i"
  25. #else
  26. %import(module="imports_a") "imports_a.h"
  27. #endif
  28. %include "imports_b.h"