git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6295 626c5289-ae23-0410-ae9c-e8d60b6d4f22
38 lines
561 B
OpenEdge ABL
38 lines
561 B
OpenEdge ABL
%module extend_placement
|
|
|
|
// Tests placement of %extend directives
|
|
|
|
// Before the class
|
|
|
|
%extend Foo {
|
|
Foo(int a) { return new Foo(); }
|
|
~Foo() { delete self;}
|
|
int spam(int x) { return x; }
|
|
};
|
|
|
|
%inline %{
|
|
class Foo {
|
|
public:
|
|
Foo(){}
|
|
|
|
int spam() { return 1; }
|
|
int spam(const char* c) { return 2; }
|
|
};
|
|
%}
|
|
|
|
// After the class
|
|
|
|
%inline %{
|
|
class Bar {
|
|
public:
|
|
int spam() { return 1; }
|
|
int spam(const char* c) { return 2; }
|
|
};
|
|
%}
|
|
|
|
|
|
%extend Bar {
|
|
Bar() { return new Bar(); }
|
|
~Bar() { delete self;}
|
|
// int spam(int x) { return x; }
|
|
};
|