fix import + typedefs. see example in imports_b.i
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6555 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
8d36ce73d6
commit
1fd5610c9f
3 changed files with 73 additions and 39 deletions
|
|
@ -13,3 +13,19 @@ class B : public A
|
|||
|
||||
A::MemberEnum global_test(A::MemberEnum e) { return e; }
|
||||
|
||||
struct C : A
|
||||
{
|
||||
typedef A a_type;
|
||||
|
||||
A* get_a(A* a)
|
||||
{
|
||||
return a;
|
||||
}
|
||||
|
||||
a_type* get_a_type(a_type* a)
|
||||
{
|
||||
return a;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -7,3 +7,11 @@ import sys
|
|||
x = imports_b.B()
|
||||
imports_a.A.hello(x)
|
||||
|
||||
a = imports_a.A()
|
||||
|
||||
c = imports_b.C()
|
||||
a1 = c.get_a(c)
|
||||
a2 = c.get_a_type(c)
|
||||
|
||||
if a1.hello() != a2.hello():
|
||||
raise RuntimeError
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue