Files
cpp-thirdparty/winx64/bin/swig-3.0.12/Examples/test-suite/global_vars.i
Bassem Girgis 81b4b9e273 Initial commit
2018-12-20 17:34:07 -06:00

37 lines
449 B
OpenEdge ABL

%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_member = x;
void *vp;
enum Hello { Hi, Hola };
Hello h;
Hello *hp;
Hello &hr = h;
void init() {
b = "string b";
x = 1234;
}
%}