Fixed Marcelo's abstract_typedef test.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4364 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
2579240289
commit
9b01ff49b0
1 changed files with 4 additions and 0 deletions
|
|
@ -127,6 +127,7 @@ class Allocate : public Dispatcher {
|
||||||
Node *nn = Getitem(abstract,i);
|
Node *nn = Getitem(abstract,i);
|
||||||
String *name = Getattr(nn,"name");
|
String *name = Getattr(nn,"name");
|
||||||
String *base_decl = Getattr(nn,"decl");
|
String *base_decl = Getattr(nn,"decl");
|
||||||
|
if (base_decl) base_decl = SwigType_typedef_resolve_all(base_decl);
|
||||||
if (Strstr(name,"~")) continue; /* Don't care about destructors */
|
if (Strstr(name,"~")) continue; /* Don't care about destructors */
|
||||||
int implemented = 0;
|
int implemented = 0;
|
||||||
Node *dn = Swig_symbol_clookup(name,0);
|
Node *dn = Swig_symbol_clookup(name,0);
|
||||||
|
|
@ -136,15 +137,18 @@ class Allocate : public Dispatcher {
|
||||||
assert(dn != 0); // Assertion of doom
|
assert(dn != 0); // Assertion of doom
|
||||||
while (dn && !implemented) {
|
while (dn && !implemented) {
|
||||||
String *local_decl = Getattr(dn,"decl");
|
String *local_decl = Getattr(dn,"decl");
|
||||||
|
if (local_decl) local_decl = SwigType_typedef_resolve_all(local_decl);
|
||||||
if (local_decl && !Strcmp(local_decl, base_decl)) {
|
if (local_decl && !Strcmp(local_decl, base_decl)) {
|
||||||
if (Getattr(dn,"abstract")) return 1;
|
if (Getattr(dn,"abstract")) return 1;
|
||||||
implemented++;
|
implemented++;
|
||||||
}
|
}
|
||||||
|
Delete(local_decl);
|
||||||
dn = Getattr(dn,"csym:nextSibling");
|
dn = Getattr(dn,"csym:nextSibling");
|
||||||
}
|
}
|
||||||
if (!implemented && (Getattr(nn,"abstract"))) {
|
if (!implemented && (Getattr(nn,"abstract"))) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
Delete(base_decl);
|
||||||
/*
|
/*
|
||||||
if (dn && (Getattr(dn,"abstract"))) {
|
if (dn && (Getattr(dn,"abstract"))) {
|
||||||
return 1;
|
return 1;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue