summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2021-03-16 06:03:37 (GMT)
committerGitHub <noreply@github.com>2021-03-16 06:03:37 (GMT)
commit651fc30af7ac6138764106b87632cabca56a98bb (patch)
treec656dd7a77205b7925b74a34ab34d73d5445e2a6 /Objects
parenta838e477a009bae4549f10bfd3396b8d5678415d (diff)
downloadcpython-651fc30af7ac6138764106b87632cabca56a98bb.zip
cpython-651fc30af7ac6138764106b87632cabca56a98bb.tar.gz
cpython-651fc30af7ac6138764106b87632cabca56a98bb.tar.bz2
bpo-43499: Silence compiler warnings about using legacy C API on Windows (GH-24873)
Diffstat (limited to 'Objects')
-rw-r--r--Objects/unicodeobject.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index ffd13f7..9cc04ee 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -4321,7 +4321,10 @@ unicode_decode_call_errorhandler_wchar(
goto onError;
}
+_Py_COMP_DIAG_PUSH
+_Py_COMP_DIAG_IGNORE_DEPR_DECLS
repwstr = PyUnicode_AsUnicodeAndSize(repunicode, &repwlen);
+_Py_COMP_DIAG_POP
if (repwstr == NULL)
goto onError;
/* need more space? (at least enough for what we
@@ -7654,7 +7657,10 @@ encode_code_page_strict(UINT code_page, PyObject **outbytes,
substring = PyUnicode_Substring(unicode, offset, offset+len);
if (substring == NULL)
return -1;
+_Py_COMP_DIAG_PUSH
+_Py_COMP_DIAG_IGNORE_DEPR_DECLS
p = PyUnicode_AsUnicodeAndSize(substring, &size);
+_Py_COMP_DIAG_POP
if (p == NULL) {
Py_DECREF(substring);
return -1;