mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +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
|
@ -134,16 +134,10 @@ static inline Py_ssize_t _Py_REFCNT(const PyObject *ob) {
|
|||
|
||||
|
||||
// bpo-39573: The Py_SET_TYPE() function must be used to set an object type.
|
||||
static inline PyTypeObject* _Py_TYPE(const PyObject *ob) {
|
||||
return ob->ob_type;
|
||||
}
|
||||
#define Py_TYPE(ob) _Py_TYPE(_PyObject_CAST_CONST(ob))
|
||||
#define Py_TYPE(ob) (_PyObject_CAST(ob)->ob_type)
|
||||
|
||||
// bpo-39573: The Py_SET_SIZE() function must be used to set an object size.
|
||||
static inline Py_ssize_t _Py_SIZE(const PyVarObject *ob) {
|
||||
return ob->ob_size;
|
||||
}
|
||||
#define Py_SIZE(ob) _Py_SIZE(_PyVarObject_CAST_CONST(ob))
|
||||
#define Py_SIZE(ob) (_PyVarObject_CAST(ob)->ob_size)
|
||||
|
||||
|
||||
static inline int _Py_IS_TYPE(const PyObject *ob, const PyTypeObject *type) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue