test added for nested unnamed C struct %extend
This commit is contained in:
parent
2aa540b9c0
commit
5d78f14b1c
2 changed files with 15 additions and 2 deletions
|
|
@ -44,6 +44,13 @@
|
|||
return $self->num;
|
||||
}
|
||||
}
|
||||
|
||||
%extend FOO_bar {
|
||||
void bar_extend() {
|
||||
$self->d = 1;
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
%inline %{
|
||||
|
|
@ -72,5 +79,13 @@ typedef struct {
|
|||
int num;
|
||||
} lowB_instance;
|
||||
} NestedB;
|
||||
|
||||
typedef struct {
|
||||
int a;
|
||||
union {
|
||||
char c;
|
||||
int d;
|
||||
} bar;
|
||||
} FOO;
|
||||
%}
|
||||
|
||||
|
|
|
|||
|
|
@ -378,8 +378,6 @@ void Swig_nested_name_unnamed_c_structs(Node *n) {
|
|||
decl = nextSibling(decl);
|
||||
}
|
||||
Delete(ty);
|
||||
// Check for extensions
|
||||
// TODO: we can save extensions hash like class hash and move check_extensions() after nesting processing
|
||||
if (extendhash) {
|
||||
if (Node *am = Getattr(extendhash, name)) {
|
||||
// Merge the extension into the symbol table
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue