import source from 1.3.40
[external/swig.git] / Examples / test-suite / imports_b.i
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
6    Extra tests added for enums to test languages that have enum types.
7 */
8
9 %module imports_b
10
11 %{ 
12 #include "imports_b.h" 
13 %} 
14
15
16 /* 
17    To import, you can use either
18    
19      %import "imports_a.i"
20
21    or
22
23      %import(module="imports_a") "imports_a.h" 
24
25
26    In the first case, imports_a.i should declare the module name using
27    the %module directive.
28
29    In the second case, the file could be either a .h file, where no
30    %module directive will be found, or a swig interface file, where
31    the module option will take priority over any %module directive
32    inside the imported file.
33
34 */
35
36 #if 0
37   %import "imports_a.i"
38 #else
39 #  if 0
40   // Test Warning 401 (Python only)
41   %import "imports_a.h" 
42 #  else
43   %import(module="imports_a") "imports_a.h" 
44 #  endif
45 #endif
46
47 %include "imports_b.h"