From: William F. <wsf...@us...> - 2005-10-04 20:39:14
|
Update of /cvsroot/swig/SWIG/Examples/test-suite In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24495/Examples/test-suite Modified Files: compactdefaultargs.i Log Message: Fix ruby warnings Index: compactdefaultargs.i =================================================================== RCS file: /cvsroot/swig/SWIG/Examples/test-suite/compactdefaultargs.i,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** compactdefaultargs.i 30 Sep 2005 21:31:43 -0000 1.1 --- compactdefaultargs.i 4 Oct 2005 20:38:57 -0000 1.2 *************** *** 6,14 **** %inline %{ class Defaults1 { ! static const int private_default = -1; public: ! static const double public_default = -1.0; ! Defaults1(int a = private_default) {} ! double ret(double d = public_default) { return d; } }; %} --- 6,14 ---- %inline %{ class Defaults1 { ! static const int PRIVATE_DEFAULT = -1; public: ! static const double PUBLIC_DEFAULT = -1.0; ! Defaults1(int a = PRIVATE_DEFAULT) {} ! double ret(double d = PUBLIC_DEFAULT) { return d; } }; %} *************** *** 18,31 **** %feature("compactdefaultargs"); ! // Turn compactdefaultargs off for the ret method which can't work with this feature ! %feature("compactdefaultargs", "0") Defaults2(int a = private_default); %inline %{ class Defaults2 { ! static const int private_default = -1; public: ! static const double public_default = -1.0; ! Defaults2(int a = private_default) {} ! double ret(double d = public_default) { return d; } }; %} --- 18,31 ---- %feature("compactdefaultargs"); ! // Turn compactdefaultargs off for the constructor which can't work with this feature ! %feature("compactdefaultargs", "0") Defaults2(int a = PRIVATE_DEFAULT); %inline %{ class Defaults2 { ! static const int PRIVATE_DEFAULT = -1; public: ! static const double PUBLIC_DEFAULT = -1.0; ! Defaults2(int a = PRIVATE_DEFAULT) {} ! double ret(double d = PUBLIC_DEFAULT) { return d; } }; %} |