mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
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.
This commit is contained in:
parent
e8752d7b80
commit
16f8e22e7c
8 changed files with 40 additions and 9 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue