mirror of
https://github.com/python/cpython.git
synced 2025-11-01 10:45:30 +00:00
bpo-40170: Remove PyHeapType_GET_MEMBERS() macro (GH-30942)
Remove the PyHeapType_GET_MEMBERS() macro. It was exposed in the public C API by mistake, it must only be used by Python internally. Use the PyTypeObject.tp_members member instead. Rename PyHeapType_GET_MEMBERS() to _PyHeapType_GET_MEMBERS() and move it to the internal C API.
This commit is contained in:
parent
0575551f69
commit
18ea973c21
5 changed files with 19 additions and 10 deletions
|
|
@ -232,6 +232,10 @@ extern void _PyObject_FreeInstanceAttributes(PyObject *self);
|
|||
extern int _PyObject_IsInstanceDictEmpty(PyObject *);
|
||||
extern PyObject* _PyType_GetSubclasses(PyTypeObject *);
|
||||
|
||||
// Access macro to the members which are floating "behind" the object
|
||||
#define _PyHeapType_GET_MEMBERS(etype) \
|
||||
((PyMemberDef *)(((char *)etype) + Py_TYPE(etype)->tp_basicsize))
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue