Fix #3433541 %typemap(in, numinputs=0) with 10+ arguments.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12849 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2011-11-28 19:35:44 +00:00
commit 6d922f2ddd
5 changed files with 40 additions and 1 deletions

View file

@ -651,6 +651,21 @@ static char *match_identifier_end(char *base, char *s, char *token, int tokenlen
return 0;
}
static char *match_number_end(char *base, char *s, char *token, int tokenlen) {
(void) base;
while (s) {
s = strstr(s, token);
if (!s)
return 0;
if (isdigit((int) *(s + tokenlen))) {
s += tokenlen;
continue;
}
return s;
}
return 0;
}
/* -----------------------------------------------------------------------------
* replace_simple()
*
@ -899,6 +914,8 @@ static int String_replace(DOH *stro, const DOHString_or_char *token, const DOHSt
return replace_simple(str, Char(token), Char(rep), flags, count, match_identifier_begin);
} else if (flags & DOH_REPLACE_ID) {
return replace_simple(str, Char(token), Char(rep), flags, count, match_identifier);
} else if (flags & DOH_REPLACE_NUMBER_END) {
return replace_simple(str, Char(token), Char(rep), flags, count, match_number_end);
} else {
return replace_simple(str, Char(token), Char(rep), flags, count, match_simple);
}