fix $typemap() when the type contains template parameters
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11506 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
5161a12868
commit
41d3c98993
5 changed files with 48 additions and 2 deletions
|
|
@ -1699,9 +1699,10 @@ static List *split_embedded_typemap(String *s) {
|
|||
List *args = 0;
|
||||
char *c, *start;
|
||||
int level = 0;
|
||||
int angle_level = 0;
|
||||
int leading = 1;
|
||||
args = NewList();
|
||||
|
||||
args = NewList();
|
||||
c = strchr(Char(s), '(');
|
||||
assert(c);
|
||||
c++;
|
||||
|
|
@ -1720,7 +1721,7 @@ static List *split_embedded_typemap(String *s) {
|
|||
c++;
|
||||
}
|
||||
}
|
||||
if ((level == 0) && ((*c == ',') || (*c == ')'))) {
|
||||
if ((level == 0) && angle_level == 0 && ((*c == ',') || (*c == ')'))) {
|
||||
String *tmp = NewStringWithSize(start, c - start);
|
||||
Append(args, tmp);
|
||||
Delete(tmp);
|
||||
|
|
@ -1735,6 +1736,10 @@ static List *split_embedded_typemap(String *s) {
|
|||
level++;
|
||||
if (*c == ')')
|
||||
level--;
|
||||
if (*c == '<')
|
||||
angle_level++;
|
||||
if (*c == '>')
|
||||
angle_level--;
|
||||
if (isspace((int) *c) && leading)
|
||||
start++;
|
||||
if (!isspace((int) *c))
|
||||
|
|
@ -1901,6 +1906,7 @@ static void replace_embedded_typemap(String *s, ParmList *parm_sublist, Wrapper
|
|||
}
|
||||
Delete(l);
|
||||
}
|
||||
|
||||
if (syntax_error) {
|
||||
String *dtypemap = NewString(dollar_typemap);
|
||||
Replaceall(dtypemap, "$TYPEMAP", "$typemap");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue