Fix ruby warnings
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7591 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
fb635c4701
commit
02a4e87a25
1 changed files with 10 additions and 10 deletions
|
|
@ -5,11 +5,11 @@
|
||||||
// The following should compile with compactdefaultargs off
|
// The following should compile with compactdefaultargs off
|
||||||
%inline %{
|
%inline %{
|
||||||
class Defaults1 {
|
class Defaults1 {
|
||||||
static const int private_default = -1;
|
static const int PRIVATE_DEFAULT = -1;
|
||||||
public:
|
public:
|
||||||
static const double public_default = -1.0;
|
static const double PUBLIC_DEFAULT = -1.0;
|
||||||
Defaults1(int a = private_default) {}
|
Defaults1(int a = PRIVATE_DEFAULT) {}
|
||||||
double ret(double d = public_default) { return d; }
|
double ret(double d = PUBLIC_DEFAULT) { return d; }
|
||||||
};
|
};
|
||||||
%}
|
%}
|
||||||
|
|
||||||
|
|
@ -17,16 +17,16 @@ public:
|
||||||
// compactdefaultargs now on by default
|
// compactdefaultargs now on by default
|
||||||
%feature("compactdefaultargs");
|
%feature("compactdefaultargs");
|
||||||
|
|
||||||
// Turn compactdefaultargs off for the ret method which can't work with this feature
|
// Turn compactdefaultargs off for the constructor which can't work with this feature
|
||||||
%feature("compactdefaultargs", "0") Defaults2(int a = private_default);
|
%feature("compactdefaultargs", "0") Defaults2(int a = PRIVATE_DEFAULT);
|
||||||
|
|
||||||
%inline %{
|
%inline %{
|
||||||
class Defaults2 {
|
class Defaults2 {
|
||||||
static const int private_default = -1;
|
static const int PRIVATE_DEFAULT = -1;
|
||||||
public:
|
public:
|
||||||
static const double public_default = -1.0;
|
static const double PUBLIC_DEFAULT = -1.0;
|
||||||
Defaults2(int a = private_default) {}
|
Defaults2(int a = PRIVATE_DEFAULT) {}
|
||||||
double ret(double d = public_default) { return d; }
|
double ret(double d = PUBLIC_DEFAULT) { return d; }
|
||||||
};
|
};
|
||||||
%}
|
%}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue