From: William F. <wsf...@us...> - 2005-09-30 22:00:07
|
Update of /cvsroot/swig/SWIG/Examples/test-suite In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17941/Examples/test-suite Modified Files: common.mk Added Files: compactdefaultargs.i Log Message: test compactdefaultargs feature Index: common.mk =================================================================== RCS file: /cvsroot/swig/SWIG/Examples/test-suite/common.mk,v retrieving revision 1.144 retrieving revision 1.145 diff -C2 -d -r1.144 -r1.145 *** common.mk 28 Sep 2005 20:55:18 -0000 1.144 --- common.mk 30 Sep 2005 21:31:43 -0000 1.145 *************** *** 94,97 **** --- 94,98 ---- constructor_value \ contract \ + compactdefaultargs \ conversion \ conversion_namespace \ --- NEW FILE: compactdefaultargs.i --- %module compactdefaultargs // compactdefaultargs off by default // The following should compile with compactdefaultargs off %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; } }; %} // compactdefaultargs now on by default %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; } }; %} |