mirror of
https://github.com/python/cpython.git
synced 2025-08-23 02:04:56 +00:00
Issue #19569: Compiler warnings are now emitted if use most of deprecated
functions.
This commit is contained in:
parent
6107f46bfb
commit
460bd0d284
18 changed files with 143 additions and 142 deletions
|
@ -582,9 +582,7 @@ PyErr_SetFromErrnoWithFilename(PyObject *exc, const char *filename)
|
|||
PyObject *
|
||||
PyErr_SetFromErrnoWithUnicodeFilename(PyObject *exc, const Py_UNICODE *filename)
|
||||
{
|
||||
PyObject *name = filename ?
|
||||
PyUnicode_FromUnicode(filename, wcslen(filename)) :
|
||||
NULL;
|
||||
PyObject *name = filename ? PyUnicode_FromWideChar(filename, -1) : NULL;
|
||||
PyObject *result = PyErr_SetFromErrnoWithFilenameObjects(exc, name, NULL);
|
||||
Py_XDECREF(name);
|
||||
return result;
|
||||
|
@ -691,9 +689,7 @@ PyObject *PyErr_SetExcFromWindowsErrWithUnicodeFilename(
|
|||
int ierr,
|
||||
const Py_UNICODE *filename)
|
||||
{
|
||||
PyObject *name = filename ?
|
||||
PyUnicode_FromUnicode(filename, wcslen(filename)) :
|
||||
NULL;
|
||||
PyObject *name = filename ? PyUnicode_FromWideChar(filename, -1) : NULL;
|
||||
PyObject *ret = PyErr_SetExcFromWindowsErrWithFilenameObjects(exc,
|
||||
ierr,
|
||||
name,
|
||||
|
@ -729,9 +725,7 @@ PyObject *PyErr_SetFromWindowsErrWithUnicodeFilename(
|
|||
int ierr,
|
||||
const Py_UNICODE *filename)
|
||||
{
|
||||
PyObject *name = filename ?
|
||||
PyUnicode_FromUnicode(filename, wcslen(filename)) :
|
||||
NULL;
|
||||
PyObject *name = filename ? PyUnicode_FromWideChar(filename, -1) : NULL;
|
||||
PyObject *result = PyErr_SetExcFromWindowsErrWithFilenameObjects(
|
||||
PyExc_OSError,
|
||||
ierr, name, NULL);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue