/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
- %module global_vars
- %warnfilter(SWIGWARN_TYPEMAP_SWIGTYPELEAK); /* memory leak when setting a ptr/ref variable */
- %include std_string.i
- %inline %{
- struct A
- {
- int x;
- };
- std::string b;
- A a;
- A *ap;
- const A *cap;
- A &ar = a;
- int x;
- int *xp;
- int& c = x;
- void *vp;
- enum Hello { Hi, Hola };
- Hello h;
- Hello *hp;
- Hello &hr = h;
- %}