[Python-checkins] CVS: python/dist/src/Python getargs.c,2.79,2.80
Tim Peters
tim_one@users.sourceforge.net
Fri, 26 Oct 2001 23:14:34 -0700
Update of /cvsroot/python/python/dist/src/Python
In directory usw-pr-cvs1:/tmp/cvs-serv15138/python/Python
Modified Files:
getargs.c
Log Message:
vgetargskeywords: Removed all PyErr_Clear() calls. It's possible that
this routine will report an error now when it didn't before, but, if so,
it's a legitimate error that should never have been suppressed.
Index: getargs.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/getargs.c,v
retrieving revision 2.79
retrieving revision 2.80
diff -C2 -d -r2.79 -r2.80
*** getargs.c 2001/10/27 05:50:39 2.79
--- getargs.c 2001/10/27 06:14:32 2.80
***************
*** 1098,1101 ****
--- 1098,1103 ----
return 0;
}
+ else if (PyErr_Occurred())
+ return 0;
}
}
***************
*** 1108,1115 ****
if (PyDict_GetItemString(keywords, kwlist[i]))
len++;
}
}
! PyErr_Clear();
!
/* make sure we got an acceptable number of arguments; the message
is a little confusing with keywords since keyword arguments
--- 1110,1118 ----
if (PyDict_GetItemString(keywords, kwlist[i]))
len++;
+ else if (PyErr_Occurred())
+ return 0;
}
}
!
/* make sure we got an acceptable number of arguments; the message
is a little confusing with keywords since keyword arguments
***************
*** 1160,1164 ****
return 0;
}
!
/* convert the keyword arguments; this uses the format
string where it was left after processing args */
--- 1163,1167 ----
return 0;
}
!
/* convert the keyword arguments; this uses the format
string where it was left after processing args */
***************
*** 1179,1184 ****
converted++;
}
else {
- PyErr_Clear();
msg = skipitem(&format, p_va);
if (msg) {
--- 1182,1188 ----
converted++;
}
+ else if (PyErr_Occurred())
+ return 0;
else {
msg = skipitem(&format, p_va);
if (msg) {