diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2021-03-16 08:03:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-16 08:03:37 +0200 |
commit | 651fc30af7ac6138764106b87632cabca56a98bb (patch) | |
tree | c656dd7a77205b7925b74a34ab34d73d5445e2a6 /Python/fileutils.c | |
parent | a838e477a009bae4549f10bfd3396b8d5678415d (diff) | |
download | cpython-git-651fc30af7ac6138764106b87632cabca56a98bb.tar.gz |
bpo-43499: Silence compiler warnings about using legacy C API on Windows (GH-24873)
Diffstat (limited to 'Python/fileutils.c')
-rw-r--r-- | Python/fileutils.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Python/fileutils.c b/Python/fileutils.c index ddc090988f..cf11e9297d 100644 --- a/Python/fileutils.c +++ b/Python/fileutils.c @@ -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; |