mirror of
https://github.com/python/cpython.git
synced 2025-08-22 09:45:06 +00:00
Change PyErr_Format() to generate a unicode string (by using
PyUnicode_FromFormatV() instead of PyString_FromFormatV()). Change calls to PyErr_Format() to benefit from the new format specifiers: Using %S, object instead of %s, PyString_AS_STRING(object) with will work with unicode objects too.
This commit is contained in:
parent
e65c86cca0
commit
573c08c1b7
5 changed files with 33 additions and 45 deletions
|
@ -173,8 +173,7 @@ PyAPI_FUNC(PyObject *) PyErr_SetFromErrnoWithUnicodeFilename(
|
|||
PyObject *, Py_UNICODE *);
|
||||
#endif /* Py_WIN_WIDE_FILENAMES */
|
||||
|
||||
PyAPI_FUNC(PyObject *) PyErr_Format(PyObject *, const char *, ...)
|
||||
Py_GCC_ATTRIBUTE((format(printf, 2, 3)));
|
||||
PyAPI_FUNC(PyObject *) PyErr_Format(PyObject *, const char *, ...);
|
||||
|
||||
#ifdef MS_WINDOWS
|
||||
PyAPI_FUNC(PyObject *) PyErr_SetFromWindowsErrWithFilenameObject(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue