bpo-44348: Revert "bpo-39573: Py_TYPE becomes a static inline function (GH-26493)" (GH-26596)

This reverts commit f3fa63ec75 as is
causing crashes in some Windows tests in the buildbots.
This commit is contained in:
Pablo Galindo 2021-06-08 12:24:40 +01:00 committed by GitHub
parent d56e700d6c
commit 6d518bb3a1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 52 deletions

View file

@ -5423,9 +5423,10 @@ test_set_type_size(PyObject *self, PyObject *Py_UNUSED(ignored))
assert(Py_TYPE(obj) == &PyList_Type);
assert(Py_SIZE(obj) == 0);
// bpo-39573: Test Py_SET_TYPE() and Py_SET_SIZE() functions.
Py_SET_TYPE(obj, &PyList_Type);
Py_SET_SIZE(obj, 0);
// bpo-39573: Check that Py_TYPE() and Py_SIZE() can be used
// as l-values to set an object type and size.
Py_TYPE(obj) = &PyList_Type;
Py_SIZE(obj) = 0;
Py_DECREF(obj);
Py_RETURN_NONE;