mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
gh-142217: Remove internal _Py_Identifier functions (#142219)
Remove internal functions: * _PyDict_ContainsId() * _PyDict_DelItemId() * _PyDict_GetItemIdWithError() * _PyDict_SetItemId() * _PyEval_GetBuiltinId() * _PyObject_CallMethodIdNoArgs() * _PyObject_CallMethodIdObjArgs() * _PyObject_CallMethodIdOneArg() * _PyObject_VectorcallMethodId() * _PyUnicode_EqualToASCIIId() These functions were not exported and so no usable outside CPython.
This commit is contained in:
parent
4172644d78
commit
7e5fcae09b
9 changed files with 0 additions and 172 deletions
|
|
@ -2527,18 +2527,6 @@ _PyDict_GetItemWithError(PyObject *dp, PyObject *kv)
|
|||
return _PyDict_GetItem_KnownHash(dp, kv, hash); // borrowed reference
|
||||
}
|
||||
|
||||
PyObject *
|
||||
_PyDict_GetItemIdWithError(PyObject *dp, _Py_Identifier *key)
|
||||
{
|
||||
PyObject *kv;
|
||||
kv = _PyUnicode_FromId(key); /* borrowed */
|
||||
if (kv == NULL)
|
||||
return NULL;
|
||||
Py_hash_t hash = unicode_get_hash(kv);
|
||||
assert (hash != -1); /* interned strings have their hash value initialised */
|
||||
return _PyDict_GetItem_KnownHash(dp, kv, hash); // borrowed reference
|
||||
}
|
||||
|
||||
PyObject *
|
||||
_PyDict_GetItemStringWithError(PyObject *v, const char *key)
|
||||
{
|
||||
|
|
@ -4845,16 +4833,6 @@ _PyDict_Contains_KnownHash(PyObject *op, PyObject *key, Py_hash_t hash)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
_PyDict_ContainsId(PyObject *op, _Py_Identifier *key)
|
||||
{
|
||||
PyObject *kv = _PyUnicode_FromId(key); /* borrowed */
|
||||
if (kv == NULL) {
|
||||
return -1;
|
||||
}
|
||||
return PyDict_Contains(op, kv);
|
||||
}
|
||||
|
||||
/* Hack to implement "key in dict" */
|
||||
static PySequenceMethods dict_as_sequence = {
|
||||
0, /* sq_length */
|
||||
|
|
@ -5035,16 +5013,6 @@ PyDict_GetItemStringRef(PyObject *v, const char *key, PyObject **result)
|
|||
return res;
|
||||
}
|
||||
|
||||
int
|
||||
_PyDict_SetItemId(PyObject *v, _Py_Identifier *key, PyObject *item)
|
||||
{
|
||||
PyObject *kv;
|
||||
kv = _PyUnicode_FromId(key); /* borrowed */
|
||||
if (kv == NULL)
|
||||
return -1;
|
||||
return PyDict_SetItem(v, kv, item);
|
||||
}
|
||||
|
||||
int
|
||||
PyDict_SetItemString(PyObject *v, const char *key, PyObject *item)
|
||||
{
|
||||
|
|
@ -5060,15 +5028,6 @@ PyDict_SetItemString(PyObject *v, const char *key, PyObject *item)
|
|||
return err;
|
||||
}
|
||||
|
||||
int
|
||||
_PyDict_DelItemId(PyObject *v, _Py_Identifier *key)
|
||||
{
|
||||
PyObject *kv = _PyUnicode_FromId(key); /* borrowed */
|
||||
if (kv == NULL)
|
||||
return -1;
|
||||
return PyDict_DelItem(v, kv);
|
||||
}
|
||||
|
||||
int
|
||||
PyDict_DelItemString(PyObject *v, const char *key)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue