mirror of
https://github.com/python/cpython
synced 2026-09-29 11:50:30 +03:00
Issue #24254: Preserve class attribute definition order.
This commit is contained in:
parent
4565986138
commit
92a6c170e6
18 changed files with 568 additions and 189 deletions
|
|
@ -421,6 +421,8 @@ typedef struct _typeobject {
|
|||
|
||||
destructor tp_finalize;
|
||||
|
||||
PyObject *tp_deforder;
|
||||
|
||||
#ifdef COUNT_ALLOCS
|
||||
/* these must be last and never explicitly initialized */
|
||||
Py_ssize_t tp_allocs;
|
||||
|
|
|
|||
|
|
@ -28,6 +28,10 @@ PyAPI_FUNC(PyObject *) PyODict_New(void);
|
|||
PyAPI_FUNC(int) PyODict_SetItem(PyObject *od, PyObject *key, PyObject *item);
|
||||
PyAPI_FUNC(int) PyODict_DelItem(PyObject *od, PyObject *key);
|
||||
|
||||
#ifndef Py_LIMITED_API
|
||||
PyAPI_FUNC(PyObject *) _PyODict_KeysAsTuple(PyObject *od);
|
||||
#endif
|
||||
|
||||
/* wrappers around PyDict* functions */
|
||||
#define PyODict_GetItem(od, key) PyDict_GetItem((PyObject *)od, key)
|
||||
#define PyODict_GetItemWithError(od, key) \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue