@@ -222,13 +222,19 @@ in various ways. There is a separate error indicator for each thread.
222222 when the system call returns an error.
223223
224224
225- .. c :function :: PyObject* PyErr_SetFromErrnoWithFilename (PyObject *type, const char *filename )
225+ .. c :function :: PyObject* PyErr_SetFromErrnoWithFilenameObject (PyObject *type, PyObject *filenameObject )
226226
227227 Similar to :c:func: `PyErr_SetFromErrno `, with the additional behavior that if
228- *filename * is not *NULL *, it is passed to the constructor of *type * as a third
229- parameter. In the case of exceptions such as :exc: `IOError ` and :exc: `OSError `,
230- this is used to define the :attr: `filename ` attribute of the exception instance.
231- *filename * is decoded from the filesystem encoding
228+ *filenameObject * is not *NULL *, it is passed to the constructor of *type * as
229+ a third parameter. In the case of exceptions such as :exc: `IOError ` and
230+ :exc: `OSError `, this is used to define the :attr: `filename ` attribute of the
231+ exception instance.
232+
233+
234+ .. c :function :: PyObject* PyErr_SetFromErrnoWithFilename (PyObject *type, const char *filename)
235+
236+ Similar to :c:func: `PyErr_SetFromErrnoWithFilenameObject `, but the filename
237+ is given as a C string. *filename * is decoded from the filesystem encoding
232238 (:func: `sys.getfilesystemencoding `).
233239
234240
@@ -250,16 +256,28 @@ in various ways. There is a separate error indicator for each thread.
250256 specifying the exception type to be raised. Availability: Windows.
251257
252258
259+ .. c :function :: PyObject* PyErr_SetFromWindowsErrWithFilenameObject (int ierr, PyObject *filenameObject)
260+
261+ Similar to :c:func: `PyErr_SetFromWindowsErr `, with the additional behavior
262+ that if *filenameObject * is not *NULL *, it is passed to the constructor of
263+ :exc: `WindowsError ` as a third parameter. Availability: Windows.
264+
265+
253266.. c :function :: PyObject* PyErr_SetFromWindowsErrWithFilename (int ierr, const char *filename)
254267
255- Similar to :c:func: `PyErr_SetFromWindowsErr `, with the additional behavior that
256- if *filename * is not *NULL *, it is passed to the constructor of
257- :exc: `WindowsError ` as a third parameter. *filename * is decoded from the
258- filesystem encoding (:func: `sys.getfilesystemencoding `). Availability:
259- Windows.
268+ Similar to :c:func: `PyErr_SetFromWindowsErrWithFilenameObject `, but the
269+ filename is given as a C string. *filename * is decoded from the filesystem
270+ encoding (:func: `sys.getfilesystemencoding `). Availability: Windows.
271+
272+
273+ .. c:function:: PyObject* PyErr_SetExcFromWindowsErrWithFilenameObject(PyObject *type, int ierr, PyObject *filename)
274+
275+ Similar to :c:func: `PyErr_SetFromWindowsErrWithFilenameObject `, with an
276+ additional parameter specifying the exception type to be raised.
277+ Availability: Windows.
260278
261279
262- .. c:function:: PyObject* PyErr_SetExcFromWindowsErrWithFilename(PyObject *type, int ierr, char *filename)
280+ .. c :function :: PyObject* PyErr_SetExcFromWindowsErrWithFilename (PyObject *type, int ierr, const char *filename)
263281
264282 Similar to :c:func: `PyErr_SetFromWindowsErrWithFilename `, with an additional
265283 parameter specifying the exception type to be raised. Availability: Windows.
0 commit comments