Fix seg fault with %interface and using declarations

This commit is contained in:
William S Fulton 2017-08-21 18:34:51 +01:00
commit 665b09ffc9

View file

@ -151,12 +151,14 @@ void Swig_interface_propagate_methods(Node *n) {
for (Node *child = firstChild(n); child; child = nextSibling(child)) { for (Node *child = firstChild(n); child; child = nextSibling(child)) {
if (Getattr(child, "interface:owner")) if (Getattr(child, "interface:owner"))
break; // at the end of the list are newly appended methods break; // at the end of the list are newly appended methods
if (checkAttribute(child, "name", name)) { if (Cmp(nodeType(child), "cdecl") == 0) {
String *decl = SwigType_typedef_resolve_all(Getattr(child, "decl")); if (checkAttribute(child, "name", name)) {
identically_overloaded_method = Strcmp(decl, this_decl_resolved) == 0; String *decl = SwigType_typedef_resolve_all(Getattr(child, "decl"));
Delete(decl); identically_overloaded_method = Strcmp(decl, this_decl_resolved) == 0;
if (identically_overloaded_method) Delete(decl);
break; if (identically_overloaded_method)
break;
}
} }
} }
} }