/tags/rel-1-3-29/SWIG/Examples/test-suite/global_vars.i
Swig | 31 lines | 22 code | 9 blank | 0 comment | 0 complexity | 54f115c282f58497c74f47ea383067eb MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
1%module global_vars 2 3%warnfilter(SWIGWARN_TYPEMAP_SWIGTYPELEAK); /* memory leak when setting a ptr/ref variable */ 4 5%include std_string.i 6 7%inline %{ 8 9 struct A 10 { 11 int x; 12 }; 13 14 std::string b; 15 A a; 16 A *ap; 17 const A *cap; 18 A &ar = a; 19 20 int x; 21 int *xp; 22 int& c = x; 23 24 void *vp; 25 26 enum Hello { Hi, Hola }; 27 28 Hello h; 29 Hello *hp; 30 Hello &hr = h; 31%}