mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +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
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue