mirror of
https://github.com/python/cpython.git
synced 2025-08-26 19:55:24 +00:00
bpo-43499: Silence compiler warnings about using legacy C API on Windows (GH-24873)
This commit is contained in:
parent
a838e477a0
commit
651fc30af7
8 changed files with 42 additions and 0 deletions
|
@ -1010,7 +1010,10 @@ _Py_stat(PyObject *path, struct stat *statbuf)
|
|||
struct _stat wstatbuf;
|
||||
const wchar_t *wpath;
|
||||
|
||||
_Py_COMP_DIAG_PUSH
|
||||
_Py_COMP_DIAG_IGNORE_DEPR_DECLS
|
||||
wpath = _PyUnicode_AsUnicode(path);
|
||||
_Py_COMP_DIAG_POP
|
||||
if (wpath == NULL)
|
||||
return -2;
|
||||
|
||||
|
@ -1455,7 +1458,10 @@ _Py_fopen_obj(PyObject *path, const char *mode)
|
|||
Py_TYPE(path));
|
||||
return NULL;
|
||||
}
|
||||
_Py_COMP_DIAG_PUSH
|
||||
_Py_COMP_DIAG_IGNORE_DEPR_DECLS
|
||||
wpath = _PyUnicode_AsUnicode(path);
|
||||
_Py_COMP_DIAG_POP
|
||||
if (wpath == NULL)
|
||||
return NULL;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue