/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
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
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%import(module="imports_a") "imports_a.h" 40#endif 41 42%include "imports_b.h"