Mercurial > cpython-lru_cache-weakref
diff Include/pyerrors.h @ 64639:1cfad55de5bd
Issue #9738: PyUnicode_FromFormat() and PyErr_Format() raise an error on
a non-ASCII byte in the format string.
Document also the encoding.
| author | Victor Stinner <victor.stinner@haypocalc.com> |
|---|---|
| date | Sat, 11 Sep 2010 00:54:47 +0000 |
| parents | cab14be0ada1 |
| children | 00e4ce31d404 |
line wrap: on
line diff
--- a/Include/pyerrors.h Sat Sep 11 00:39:25 2010 +0000 +++ b/Include/pyerrors.h Sat Sep 11 00:54:47 2010 +0000 @@ -183,7 +183,11 @@ PyObject *, const Py_UNICODE *); #endif /* MS_WINDOWS */ -PyAPI_FUNC(PyObject *) PyErr_Format(PyObject *, const char *, ...); +PyAPI_FUNC(PyObject *) PyErr_Format( + PyObject *exception, + const char *format, /* ASCII-encoded string */ + ... + ); #ifdef MS_WINDOWS PyAPI_FUNC(PyObject *) PyErr_SetFromWindowsErrWithFilenameObject(
