The exception thrown used to be a NameError. However, as this access is via a primary, an AttributeError is more correct and so the exception thrown now is an AttributeError. Reference: http://docs.python.org/2/reference/expressions.html#attribute-references SF Patch #346.
36 lines
449 B
OpenEdge ABL
36 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;
|
|
}
|
|
%}
|