add macro to disable the extra qualifications in members, which seems to be no standard and not supported in gcc4.1 or so

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8502 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2006-01-21 08:24:52 +00:00
commit 0b68b64c59
2 changed files with 47 additions and 8 deletions

View file

@ -1,6 +1,7 @@
%module class_scope_weird
%inline %{
%inline {
#if !defined(SWIG_NOEXTRA_QUALIFICATION)
class Foo {
public:
Foo::Foo(void)
@ -15,11 +16,28 @@ public:
return x;
}
};
#else
class Foo {
public:
Foo(void)
{
}
Foo(int)
{
}
int bar(int x) {
return x;
}
};
#endif
class Quat;
class matrix4;
class tacka3;
#if !defined(SWIG_NOEXTRA_QUALIFICATION)
class Quat {
public:
Quat::Quat(void){}
@ -27,5 +45,14 @@ public:
Quat::Quat(const tacka3& axis, float angle){}
Quat::Quat(const matrix4& m){}
};
%}
#else
class Quat {
public:
Quat(void){}
Quat(float in_w, float x, float y, float z){}
Quat(const tacka3& axis, float angle){}
Quat(const matrix4& m){}
};
#endif
}