Update of /cvsroot/swig/SWIG/Examples/test-suite
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3766/Examples/test-suite
Modified Files:
overload_simple.i
Log Message:
add SWIG_TYPECHECK_SWIGOBJECT to resolve simple overload functions as Graph(int i)/Graph(PyObject* p)
Index: overload_simple.i
===================================================================
RCS file: /cvsroot/swig/SWIG/Examples/test-suite/overload_simple.i,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** overload_simple.i 21 Feb 2006 11:09:05 -0000 1.14
--- overload_simple.i 2 Mar 2006 06:13:13 -0000 1.15
***************
*** 179,180 ****
--- 179,196 ----
};
}
+
+ #ifdef SWIGPYTHON
+ %inline
+ {
+ class Graph {
+ public:
+ int val;
+ Graph(int i) : val(i) {};
+ };
+ }
+
+ %extend Graph {
+ Graph(PyObject* p) { return new Graph(123);}
+ }
+
+ #endif
|