Use DOH String instead of static char buffers.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9339 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
df3bf6ba47
commit
551738fe8c
5 changed files with 49 additions and 52 deletions
|
|
@ -66,28 +66,24 @@ Swig_warning(int wnum, const String_or_char *filename, int line, const char *fmt
|
|||
va_list ap;
|
||||
if (silence) return;
|
||||
if (!init_fmt) Swig_error_msg_format(DEFAULT_ERROR_MSG_FORMAT);
|
||||
|
||||
|
||||
va_start(ap,fmt);
|
||||
|
||||
out = NewStringEmpty();
|
||||
vPrintf(out,fmt,ap);
|
||||
{
|
||||
char temp[64], *t;
|
||||
t = temp;
|
||||
msg = Char(out);
|
||||
while (isdigit((int) *msg)) {
|
||||
*(t++) = *(msg++);
|
||||
}
|
||||
if (t != temp) {
|
||||
|
||||
msg = Char(out);
|
||||
if (isdigit((unsigned char)*msg)) {
|
||||
unsigned long result = strtoul(msg, &msg, 10);
|
||||
if (msg != Char(out)) {
|
||||
msg++;
|
||||
*t = 0;
|
||||
wnum = atoi(temp);
|
||||
wnum = result;
|
||||
}
|
||||
}
|
||||
|
||||
/* Check in the warning filter */
|
||||
if (filter) {
|
||||
char temp[32];
|
||||
char temp[32];
|
||||
char *c;
|
||||
char *f = Char(filter);
|
||||
sprintf(temp,"%d",wnum);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue