From 1205f2774e00d38d3229a3a2742c2fcbc767bdde Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Sat, 11 Sep 2010 00:54:47 +0000 Subject: Issue #9738: PyUnicode_FromFormat() and PyErr_Format() raise an error on a non-ASCII byte in the format string. Document also the encoding. --- Include/pyerrors.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Include/pyerrors.h') diff --git a/Include/pyerrors.h b/Include/pyerrors.h index 1eee16d2a8..243bc018da 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( -- cgit v1.2.1