diff options
author | Victor Stinner <vstinner@python.org> | 2024-06-18 14:28:48 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-18 14:28:48 (GMT) |
commit | 16f8e22e7c681d8e8184048ed1bf927d33e11758 (patch) | |
tree | 372790588b45c65c63dbb3a16e7cc64911bd8ab2 /Objects/object.c | |
parent | e8752d7b80775ec2a348cd4bf38cbe26a4a07615 (diff) | |
download | cpython-16f8e22e7c681d8e8184048ed1bf927d33e11758.zip cpython-16f8e22e7c681d8e8184048ed1bf927d33e11758.tar.gz cpython-16f8e22e7c681d8e8184048ed1bf927d33e11758.tar.bz2 |
gh-120600: Make Py_TYPE() opaque in limited C API 3.14 (#120601)
In the limited C API 3.14 and newer, Py_TYPE() is now implemented as
an opaque function call to hide implementation details.
Diffstat (limited to 'Objects/object.c')
-rw-r--r-- | Objects/object.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Objects/object.c b/Objects/object.c index b773047..16f940f 100644 --- a/Objects/object.c +++ b/Objects/object.c @@ -3001,3 +3001,11 @@ Py_GetConstantBorrowed(unsigned int constant_id) // All constants are immortal return Py_GetConstant(constant_id); } + + +// Py_TYPE() implementation for the stable ABI +#undef Py_TYPE +PyTypeObject* Py_TYPE(PyObject *ob) +{ + return _Py_TYPE(ob); +} |