29 lines
448 B
OpenEdge ABL
29 lines
448 B
OpenEdge ABL
%module nested_scope
|
|
|
|
#if !defined(SWIGCSHARP) && !defined(SWIGJAVA)
|
|
%feature ("flatnested");
|
|
#endif
|
|
|
|
%inline %{
|
|
namespace ns {
|
|
// "global" is a case-insensitive keyword in PHP.
|
|
struct Global_ {
|
|
#ifdef __clang__
|
|
struct Outer {
|
|
struct Nested;
|
|
struct Nested {
|
|
int data;
|
|
};
|
|
};
|
|
struct Outer::Nested instance;
|
|
#else
|
|
struct Outer {
|
|
struct Nested;
|
|
};
|
|
struct Outer::Nested {
|
|
int data;
|
|
} instance;
|
|
#endif
|
|
};
|
|
}
|
|
%}
|