mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Issue #14383: Add _PyDict_GetItemId() and _PyDict_SetItemId() functions
These functions simplify the usage of static constant Unicode strings. Generalize the usage of _Py_Identifier in ceval.c and typeobject.c.
This commit is contained in:
parent
70b2e1e7d9
commit
3c1e48176e
4 changed files with 118 additions and 122 deletions
|
@ -155,7 +155,9 @@ PyAPI_FUNC(int) PyDict_MergeFromSeq2(PyObject *d,
|
|||
int override);
|
||||
|
||||
PyAPI_FUNC(PyObject *) PyDict_GetItemString(PyObject *dp, const char *key);
|
||||
PyAPI_FUNC(PyObject *) _PyDict_GetItemId(PyObject *dp, struct _Py_Identifier *key);
|
||||
PyAPI_FUNC(int) PyDict_SetItemString(PyObject *dp, const char *key, PyObject *item);
|
||||
PyAPI_FUNC(int) _PyDict_SetItemId(PyObject *dp, struct _Py_Identifier *key, PyObject *item);
|
||||
PyAPI_FUNC(int) PyDict_DelItemString(PyObject *dp, const char *key);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue