bpo-44113: Fix compiler warning in PySys_AddWarnOption() (GH-26084)

Ignore Py_DEPRECATED() warning on purpose.
This commit is contained in:
Victor Stinner 2021-05-13 02:27:56 +02:00 committed by GitHub
parent 8ea350ee90
commit ec7c09b9bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -2293,7 +2293,10 @@ PySys_AddWarnOption(const wchar_t *s)
unicode = PyUnicode_FromWideChar(s, -1);
if (unicode == NULL)
return;
_Py_COMP_DIAG_PUSH
_Py_COMP_DIAG_IGNORE_DEPR_DECLS
PySys_AddWarnOptionUnicode(unicode);
_Py_COMP_DIAG_POP
Py_DECREF(unicode);
}