global unnamed structures ignored
This commit is contained in:
parent
5d78f14b1c
commit
3692e175bc
3 changed files with 13 additions and 1 deletions
|
|
@ -87,5 +87,9 @@ typedef struct {
|
||||||
int d;
|
int d;
|
||||||
} bar;
|
} bar;
|
||||||
} FOO;
|
} FOO;
|
||||||
|
|
||||||
|
struct {
|
||||||
|
int i;
|
||||||
|
} THING;
|
||||||
%}
|
%}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -396,7 +396,12 @@ void Swig_nested_name_unnamed_c_structs(Node *n) {
|
||||||
Delete(ins);
|
Delete(ins);
|
||||||
Delattr(c, "nested:outer");
|
Delattr(c, "nested:outer");
|
||||||
} else {
|
} else {
|
||||||
// global unnamed struct - ignore it
|
// global unnamed struct - ignore it and it's instances
|
||||||
|
SetFlag(c, "feature:ignore");
|
||||||
|
while (next && Getattr(next, "nested:unnamedtype") == c) {
|
||||||
|
SetFlag(next, "feature:ignore");
|
||||||
|
next = nextSibling(next);
|
||||||
|
}
|
||||||
c = next;
|
c = next;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -661,6 +661,9 @@ class TypePass:private Dispatcher {
|
||||||
* ------------------------------------------------------------ */
|
* ------------------------------------------------------------ */
|
||||||
|
|
||||||
virtual int cDeclaration(Node *n) {
|
virtual int cDeclaration(Node *n) {
|
||||||
|
if (GetFlag(n, "feature:ignore")) {
|
||||||
|
return SWIG_OK;
|
||||||
|
}
|
||||||
if (NoExcept) {
|
if (NoExcept) {
|
||||||
Delattr(n, "throws");
|
Delattr(n, "throws");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue