swig/Examples/test-suite/director_finalizer.i
Ian Lance Taylor 2970f53c21 Remove the -rename option in the Go language support. Do a much
better job of checking for name conflicts.  Ignore conflicting names
with a warning.  Adjust the testsuite accordingly.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12135 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-06-17 18:59:26 +00:00

45 lines
645 B
OpenEdge ABL

%module(directors="1") director_finalizer
%warnfilter(SWIGWARN_GO_NAME_CONFLICT); /* Ignoring 'deleteFoo' due to Go name ('DeleteFoo') conflict with '~Foo' */
%{
int status = 0;
class Foo {
public:
virtual ~Foo() { orStatus(1); }
virtual void orStatus(int x) { status |= x; }
};
void deleteFoo(Foo *f) {
delete f;
}
Foo *launder(Foo *f) {
return f;
}
int getStatus() {
return status;
}
void resetStatus() {
status = 0;
}
%}
%feature("director") Foo;
class Foo {
public:
virtual ~Foo();
virtual void orStatus(int x);
};
void deleteFoo(Foo *f);
int getStatus();
Foo *launder(Foo *f);
void resetStatus();