]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-106320: Remove private _PyDict functions (#108449)
authorVictor Stinner <vstinner@python.org>
Thu, 24 Aug 2023 20:01:50 +0000 (22:01 +0200)
committerGitHub <noreply@github.com>
Thu, 24 Aug 2023 20:01:50 +0000 (20:01 +0000)
commit26893016a7f204b2e7138fc9ce04525a651c202e
tree994751eab58657e125b23a426fb5441612ec5ad2
parentc3d580b238fb1b5a72d5608ff7905e9ad726d1bb
gh-106320: Remove private _PyDict functions (#108449)

Move private functions to the internal C API (pycore_dict.h):

* _PyDictView_Intersect()
* _PyDictView_New()
* _PyDict_ContainsId()
* _PyDict_DelItemId()
* _PyDict_DelItem_KnownHash()
* _PyDict_GetItemIdWithError()
* _PyDict_GetItem_KnownHash()
* _PyDict_HasSplitTable()
* _PyDict_NewPresized()
* _PyDict_Next()
* _PyDict_Pop()
* _PyDict_SetItemId()
* _PyDict_SetItem_KnownHash()
* _PyDict_SizeOf()

No longer export most of these functions.

Move also the _PyDictViewObject structure to the internal C API.

Move dict_getitem_knownhash() function from _testcapi to the
_testinternalcapi extension. Update test_capi.test_dict for this
change.
12 files changed:
Include/cpython/dictobject.h
Include/internal/pycore_dict.h
Lib/test/test_dict.py
Modules/_asynciomodule.c
Modules/_collectionsmodule.c
Modules/_ctypes/stgdict.c
Modules/_sre/sre.c
Modules/_testcapimodule.c
Modules/_testinternalcapi.c
Modules/_threadmodule.c
Modules/socketmodule.c
Python/import.c