@@ -235,7 +235,7 @@ in various ways. There is a separate error indicator for each thread.
235235
236236 Similar to :c:func: `PyErr_SetFromErrnoWithFilenameObject `, but the filename
237237 is given as a C string. *filename * is decoded from the filesystem encoding
238- (:func: `sys.getfilesystemencoding `).
238+ (:func: `os.fsdecode `).
239239
240240
241241.. c:function:: PyObject* PyErr_SetFromWindowsErr(int ierr)
@@ -267,7 +267,7 @@ in various ways. There is a separate error indicator for each thread.
267267
268268 Similar to :c:func: `PyErr_SetFromWindowsErrWithFilenameObject `, but the
269269 filename is given as a C string. *filename * is decoded from the filesystem
270- encoding (:func: `sys.getfilesystemencoding `). Availability: Windows.
270+ encoding (:func: `os.fsdecode `). Availability: Windows.
271271
272272
273273.. c:function:: PyObject* PyErr_SetExcFromWindowsErrWithFilenameObject(PyObject *type, int ierr, PyObject *filename)
@@ -293,20 +293,27 @@ in various ways. There is a separate error indicator for each thread.
293293 .. versionadded :: 3.3
294294
295295
296- .. c :function :: void PyErr_SyntaxLocationEx (char *filename, int lineno, int col_offset)
296+ .. c :function :: void PyErr_SyntaxLocationObject (PyObject *filename, int lineno, int col_offset)
297297
298298 Set file, line, and offset information for the current exception. If the
299299 current exception is not a :exc: `SyntaxError `, then it sets additional
300300 attributes, which make the exception printing subsystem think the exception
301- is a :exc: `SyntaxError `. *filename * is decoded from the filesystem encoding
302- (:func: `sys.getfilesystemencoding `).
301+ is a :exc: `SyntaxError `.
303302
304- .. versionadded:: 3.2
303+ .. versionadded :: 3.4
304+
305+
306+ .. c :function :: void PyErr_SyntaxLocationEx (char *filename, int lineno, int col_offset)
307+
308+ Like :c:func: `PyErr_SyntaxLocationObject `, but *filename * is a byte string
309+ decoded from the filesystem encoding (:func: `os.fsdecode `).
310+
311+ .. versionadded:: 3.2
305312
306313
307314.. c:function:: void PyErr_SyntaxLocation(char *filename, int lineno)
308315
309- Like :c:func: `PyErr_SyntaxLocationExc `, but the col_offset parameter is
316+ Like :c:func: `PyErr_SyntaxLocationEx `, but the col_offset parameter is
310317 omitted.
311318
312319
@@ -355,15 +362,22 @@ in various ways. There is a separate error indicator for each thread.
355362 documentation. There is no C API for warning control.
356363
357364
358- .. c :function :: int PyErr_WarnExplicit (PyObject *category, const char *message, const char *filename, int lineno, const char *module, PyObject *registry)
365+ .. c :function :: int PyErr_WarnExplicitObject (PyObject *category, PyObject *message, PyObject *filename, int lineno, PyObject *module, PyObject *registry)
359366
360367 Issue a warning message with explicit control over all warning attributes. This
361368 is a straightforward wrapper around the Python function
362369 :func: `warnings.warn_explicit `, see there for more information. The *module *
363370 and *registry * arguments may be set to *NULL * to get the default effect
364- described there. *message * and *module * are UTF-8 encoded strings,
365- *filename * is decoded from the filesystem encoding
366- (:func: `sys.getfilesystemencoding `).
371+ described there.
372+
373+ .. versionadded :: 3.4
374+
375+
376+ .. c :function :: int PyErr_WarnExplicit (PyObject *category, const char *message, const char *filename, int lineno, const char *module, PyObject *registry)
377+
378+ Similar to :c:func: `PyErr_WarnExplicitObject ` except that *message * and
379+ *module * are UTF-8 encoded strings, and *filename * is decoded from the
380+ filesystem encoding (:func: `os.fsdecode `).
367381
368382
369383.. c:function:: int PyErr_WarnFormat(PyObject *category, Py_ssize_t stack_level, const char *format, ...)
0 commit comments