From: Marcelo M. <mar...@us...> - 2004-10-06 17:32:17
|
Update of /cvsroot/swig/SWIG/Examples/test-suite In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19752 Modified Files: common.mk overload_extend.i Log Message: more cases, and C/C++ compatibility Index: common.mk =================================================================== RCS file: /cvsroot/swig/SWIG/Examples/test-suite/common.mk,v retrieving revision 1.104 retrieving revision 1.105 diff -C2 -d -r1.104 -r1.105 *** common.mk 6 Oct 2004 08:26:57 -0000 1.104 --- common.mk 6 Oct 2004 17:32:02 -0000 1.105 *************** *** 309,312 **** --- 309,313 ---- nested \ newobject2 \ + overload_extend \ overload_extendc \ preproc \ Index: overload_extend.i =================================================================== RCS file: /cvsroot/swig/SWIG/Examples/test-suite/overload_extend.i,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** overload_extend.i 6 Oct 2004 09:33:28 -0000 1.5 --- overload_extend.i 6 Oct 2004 17:32:02 -0000 1.6 *************** *** 1,4 **** --- 1,8 ---- %module overload_extend + #ifndef __cplusplus + %typemap(default) double y "$1=1000;"; + #endif + #pragma SWIG nowarn=-302 %extend Foo { *************** *** 7,13 **** int test(char *s) { s = 0; return 2; } #ifdef __cplusplus ! int test(double x, double y = 0) { x = 0; y = 0; return 3; } #else ! int test(double x, double y) { x = 0; y = 0; return 3; } #endif }; --- 11,17 ---- int test(char *s) { s = 0; return 2; } #ifdef __cplusplus ! double test(double x, double y = 1000) { return x + y; } #else ! double test(double x, double y) { return x + y; } #endif }; |