added another case
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6299 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
7757e31139
commit
a44038b71f
2 changed files with 10 additions and 0 deletions
|
|
@ -17,6 +17,10 @@ class Foo {
|
|||
public:
|
||||
Foo(){}
|
||||
|
||||
#ifdef SWIG
|
||||
%extend { Foo(int a, int b) { return new Foo(); } }
|
||||
#endif
|
||||
|
||||
int spam() { return 1; }
|
||||
int spam(const char* c) { return 2; }
|
||||
};
|
||||
|
|
@ -62,6 +66,10 @@ class FooT {
|
|||
public:
|
||||
FooT(){}
|
||||
|
||||
#ifdef SWIG
|
||||
%extend { FooT(int a, int b) { return new FooT<T>(); } }
|
||||
#endif
|
||||
|
||||
int spam() { return 1; }
|
||||
int spam(const char* c) { return 2; }
|
||||
};
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ import extend_placement
|
|||
|
||||
foo = extend_placement.Foo()
|
||||
foo = extend_placement.Foo(1)
|
||||
foo = extend_placement.Foo(1,1)
|
||||
foo.spam()
|
||||
foo.spam("hello")
|
||||
foo.spam(1)
|
||||
|
|
@ -20,6 +21,7 @@ bar.spam(1,1,1)
|
|||
|
||||
foo = extend_placement.FooTi()
|
||||
foo = extend_placement.FooTi(1)
|
||||
foo = extend_placement.FooTi(1,1)
|
||||
foo.spam()
|
||||
foo.spam("hello")
|
||||
foo.spam(1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue