gh-146175: Soft-deprecate outdated macros; convert internal usage (GH-146178)

Co-authored-by: Victor Stinner <vstinner@python.org>
This commit is contained in:
Petr Viktorin 2026-03-23 12:42:09 +01:00 committed by GitHub
parent 90f9991abb
commit 91cd2e5806
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 160 additions and 47 deletions

View file

@ -2760,11 +2760,9 @@ array_buffer_getbuf(PyObject *op, Py_buffer *view, int flags)
view->internal = NULL;
if ((flags & PyBUF_FORMAT) == PyBUF_FORMAT) {
view->format = (char *)self->ob_descr->formats;
#ifdef Py_UNICODE_WIDE
if (self->ob_descr->typecode == 'u') {
if (sizeof(wchar_t) >= 4 && self->ob_descr->typecode == 'u') {
view->format = "w";
}
#endif
}
self->ob_exports++;