mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
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:
parent
d56e700d6c
commit
6d518bb3a1
5 changed files with 9 additions and 52 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue