summaryrefslogtreecommitdiff
path: root/Include/pyerrors.h
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2010-09-11 00:54:47 +0000
committerVictor Stinner <victor.stinner@haypocalc.com>2010-09-11 00:54:47 +0000
commit1205f2774e00d38d3229a3a2742c2fcbc767bdde (patch)
tree8f5756aa974326bf503dfaad7512aff103bde9bb /Include/pyerrors.h
parentcd419abe42b42c626d91d5f839d53bdbde9852e0 (diff)
downloadcpython-git-1205f2774e00d38d3229a3a2742c2fcbc767bdde.tar.gz
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.h6
1 files changed, 5 insertions, 1 deletions
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(