reduce the typedef reduce cases
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8924 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
357d0650ed
commit
05a5ec5e54
2 changed files with 21 additions and 8 deletions
|
|
@ -646,13 +646,22 @@ SwigType_ltype(SwigType *s) {
|
|||
}
|
||||
if (SwigType_issimple(tc)) {
|
||||
/* Resolve any typedef definitions */
|
||||
td = SwigType_typedef_resolve_all(tc);
|
||||
if (td && (SwigType_isconst(td) || SwigType_isarray(td) || SwigType_isreference(td))) {
|
||||
/* We need to use the typedef type */
|
||||
SwigType *tt = Copy(tc);
|
||||
td = 0;
|
||||
while ((td = SwigType_typedef_resolve(tt))) {
|
||||
if (td && (SwigType_isconst(td) || SwigType_isarray(td) || SwigType_isreference(td))) {
|
||||
/* We need to use the typedef type */
|
||||
Delete(tt);
|
||||
tt = td;
|
||||
break;
|
||||
} else if (td) {
|
||||
Delete(tt);
|
||||
tt = td;
|
||||
}
|
||||
}
|
||||
if (td) {
|
||||
Delete(tc);
|
||||
tc = td;
|
||||
} else if (td) {
|
||||
Delete(td);
|
||||
tc = td;
|
||||
}
|
||||
}
|
||||
elements = SwigType_split(tc);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue