Skip to content

Commit d62b741

Browse files
miss-islingtonserhiy-storchaka
authored andcommitted
bpo-29084: Exclude C API for OrderedDict from the limited C API. (GH-4900) (#5007)
(cherry picked from commit 1b3029a)
1 parent 5ff5d11 commit d62b741

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

Include/odictobject.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ extern "C" {
66

77

88
/* OrderedDict */
9+
/* This API is optional and mostly redundant. */
910

1011
#ifndef Py_LIMITED_API
1112

@@ -21,10 +22,6 @@ PyAPI_DATA(PyTypeObject) PyODictValues_Type;
2122
#define PyODict_CheckExact(op) (Py_TYPE(op) == &PyODict_Type)
2223
#define PyODict_SIZE(op) ((PyDictObject *)op)->ma_used
2324

24-
#endif /* Py_LIMITED_API */
25-
26-
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03050000
27-
2825
PyAPI_FUNC(PyObject *) PyODict_New(void);
2926
PyAPI_FUNC(int) PyODict_SetItem(PyObject *od, PyObject *key, PyObject *item);
3027
PyAPI_FUNC(int) PyODict_DelItem(PyObject *od, PyObject *key);
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Undocumented C API for OrderedDict has been excluded from the limited C API.
2+
It was added by mistake and actually never worked in the limited C API.

0 commit comments

Comments
 (0)