Minor code optimisation
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13934 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
7a89f71f36
commit
709d683926
1 changed files with 4 additions and 6 deletions
|
|
@ -336,15 +336,13 @@ class Allocate:public Dispatcher {
|
||||||
String *name = Getattr(nn, "name");
|
String *name = Getattr(nn, "name");
|
||||||
if (!name)
|
if (!name)
|
||||||
continue;
|
continue;
|
||||||
|
if (Strchr(name, '~'))
|
||||||
|
continue; /* Don't care about destructors */
|
||||||
String *base_decl = Getattr(nn, "decl");
|
String *base_decl = Getattr(nn, "decl");
|
||||||
if (base_decl)
|
if (base_decl)
|
||||||
base_decl = SwigType_typedef_resolve_all(base_decl);
|
base_decl = SwigType_typedef_resolve_all(base_decl);
|
||||||
if (Strchr(name, '~'))
|
if (SwigType_isfunction(base_decl))
|
||||||
continue; /* Don't care about destructors */
|
|
||||||
|
|
||||||
if (SwigType_isfunction(base_decl)) {
|
|
||||||
search_decl = SwigType_pop_function(base_decl);
|
search_decl = SwigType_pop_function(base_decl);
|
||||||
}
|
|
||||||
Node *dn = Swig_symbol_clookup_local_check(name, 0, check_implemented);
|
Node *dn = Swig_symbol_clookup_local_check(name, 0, check_implemented);
|
||||||
Delete(search_decl);
|
Delete(search_decl);
|
||||||
Delete(base_decl);
|
Delete(base_decl);
|
||||||
|
|
@ -415,7 +413,7 @@ class Allocate:public Dispatcher {
|
||||||
match = 1;
|
match = 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if ((!symname || (!Getattr(e, "sym:name"))) && (Cmp(name, Getattr(e, "name")) == 0)) {
|
if (!Getattr(e, "sym:name") && (Cmp(name, Getattr(e, "name")) == 0)) {
|
||||||
match = 1;
|
match = 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue