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:
parent
5e4c27cdfd
commit
6d922f2ddd
5 changed files with 40 additions and 1 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue