diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2010-09-11 00:54:47 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2010-09-11 00:54:47 (GMT) |
commit | 1205f2774e00d38d3229a3a2742c2fcbc767bdde (patch) | |
tree | 8f5756aa974326bf503dfaad7512aff103bde9bb /Include/pyerrors.h | |
parent | cd419abe42b42c626d91d5f839d53bdbde9852e0 (diff) | |
download | cpython-1205f2774e00d38d3229a3a2742c2fcbc767bdde.zip cpython-1205f2774e00d38d3229a3a2742c2fcbc767bdde.tar.gz cpython-1205f2774e00d38d3229a3a2742c2fcbc767bdde.tar.bz2 |
Issue #9738: PyUnicode_FromFormat() and PyErr_Format() raise an error on
a non-ASCII byte in the format string.
Document also the encoding.
Diffstat (limited to 'Include/pyerrors.h')
-rw-r--r-- | Include/pyerrors.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Include/pyerrors.h b/Include/pyerrors.h index 1eee16d..243bc01 100644 --- a/Include/pyerrors.h +++ b/Include/pyerrors.h @@ -183,7 +183,11 @@ PyAPI_FUNC(PyObject *) PyErr_SetFromErrnoWithUnicodeFilename( 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( |