Message250215
| Author |
eryksun |
| Recipients |
David.Edelsohn, belopolsky, eryksun, larry, serhiy.storchaka, steve.dower, vstinner |
| Date |
2015年09月08日.15:25:46 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1441725946.65.0.378260442417.issue25029@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Steve, it seems to me that for MSVC the EINVAL test should come first:
_Py_BEGIN_SUPPRESS_IPH
olderr = errno;
errno = 0;
buflen = format_time(outbuf, i, fmt, &buf);
err = errno;
errno = olderr;
_Py_END_SUPPRESS_IPH
if (buflen == 0 && err == EINVAL) {
PyErr_SetString(PyExc_ValueError, "Invalid format string");
break;
}
Then the old test could be restored, i.e. (buflen > 0 || i >= 256 * fmtlen). |
|