bpo-36346: Undeprecate private function _PyUnicode_AsUnicode(). (GH-21336)

This commit is contained in:
Serhiy Storchaka 2020-07-05 18:53:45 +03:00 committed by GitHub
parent 7fed75597f
commit b3dd5cd4a3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 5 additions and 68 deletions

View file

@ -3414,10 +3414,7 @@ PyMem_Free((void *){name});
goto exit;
}}}}
#if USE_UNICODE_WCHAR_CACHE
_Py_COMP_DIAG_PUSH
_Py_COMP_DIAG_IGNORE_DEPR_DECLS
{paramname} = _PyUnicode_AsUnicode({argname});
_Py_COMP_DIAG_POP
#else /* USE_UNICODE_WCHAR_CACHE */
{paramname} = PyUnicode_AsWideCharString({argname}, NULL);
#endif /* USE_UNICODE_WCHAR_CACHE */
@ -3432,10 +3429,7 @@ PyMem_Free((void *){name});
}}}}
else if (PyUnicode_Check({argname})) {{{{
#if USE_UNICODE_WCHAR_CACHE
_Py_COMP_DIAG_PUSH
_Py_COMP_DIAG_IGNORE_DEPR_DECLS
{paramname} = _PyUnicode_AsUnicode({argname});
_Py_COMP_DIAG_POP
#else /* USE_UNICODE_WCHAR_CACHE */
{paramname} = PyUnicode_AsWideCharString({argname}, NULL);
#endif /* USE_UNICODE_WCHAR_CACHE */