Optimise SwigType_base implementation
Also fixes assumption that templates start '<' instead of '<('.
Checked java and python test-suite - no changes in output.
This commit is contained in:
parent
e0904f44eb
commit
d3095144e1
1 changed files with 3 additions and 14 deletions
|
|
@ -1181,20 +1181,9 @@ SwigType *SwigType_base(const SwigType *t) {
|
||||||
c++;
|
c++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (*c == '<') {
|
if (*c == '<' && *(c + 1) == '(') {
|
||||||
/* Skip over template---it's part of the base name */
|
/* start of template parameters --- the remainder is part of the base */
|
||||||
int ntemp = 1;
|
break;
|
||||||
c++;
|
|
||||||
while ((*c) && (ntemp > 0)) {
|
|
||||||
if (*c == '>')
|
|
||||||
ntemp--;
|
|
||||||
else if (*c == '<')
|
|
||||||
ntemp++;
|
|
||||||
c++;
|
|
||||||
}
|
|
||||||
if (ntemp)
|
|
||||||
break;
|
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
if (*c == '(') {
|
if (*c == '(') {
|
||||||
/* Skip over params */
|
/* Skip over params */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue