gh-132825: Fix typo in dict_unhashable_type() name (#132847)

This commit is contained in:
Victor Stinner 2025-04-23 18:54:13 +02:00 committed by GitHub
parent 426449d983
commit 926ff69f3f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 18 additions and 18 deletions

View File

@ -2277,7 +2277,7 @@ PyDict_GetItem(PyObject *op, PyObject *key)
}
static void
dict_unhashtable_type(PyObject *key)
dict_unhashable_type(PyObject *key)
{
PyObject *exc = PyErr_GetRaisedException();
assert(exc != NULL);
@ -2302,7 +2302,7 @@ _PyDict_LookupIndex(PyDictObject *mp, PyObject *key)
Py_hash_t hash = _PyObject_HashFast(key);
if (hash == -1) {
dict_unhashtable_type(key);
dict_unhashable_type(key);
return -1;
}
@ -2399,7 +2399,7 @@ PyDict_GetItemRef(PyObject *op, PyObject *key, PyObject **result)
Py_hash_t hash = _PyObject_HashFast(key);
if (hash == -1) {
dict_unhashtable_type(key);
dict_unhashable_type(key);
*result = NULL;
return -1;
}
@ -2415,7 +2415,7 @@ _PyDict_GetItemRef_Unicode_LockHeld(PyDictObject *op, PyObject *key, PyObject **
Py_hash_t hash = _PyObject_HashFast(key);
if (hash == -1) {
dict_unhashtable_type(key);
dict_unhashable_type(key);
*result = NULL;
return -1;
}
@ -2453,7 +2453,7 @@ PyDict_GetItemWithError(PyObject *op, PyObject *key)
}
hash = _PyObject_HashFast(key);
if (hash == -1) {
dict_unhashtable_type(key);
dict_unhashable_type(key);
return NULL;
}
@ -2611,7 +2611,7 @@ setitem_take2_lock_held(PyDictObject *mp, PyObject *key, PyObject *value)
assert(PyDict_Check(mp));
Py_hash_t hash = _PyObject_HashFast(key);
if (hash == -1) {
dict_unhashtable_type(key);
dict_unhashable_type(key);
Py_DECREF(key);
Py_DECREF(value);
return -1;
@ -2763,7 +2763,7 @@ PyDict_DelItem(PyObject *op, PyObject *key)
assert(key);
Py_hash_t hash = _PyObject_HashFast(key);
if (hash == -1) {
dict_unhashtable_type(key);
dict_unhashable_type(key);
return -1;
}
@ -3086,7 +3086,7 @@ pop_lock_held(PyObject *op, PyObject *key, PyObject **result)
Py_hash_t hash = _PyObject_HashFast(key);
if (hash == -1) {
dict_unhashtable_type(key);
dict_unhashable_type(key);
if (result) {
*result = NULL;
}
@ -3421,7 +3421,7 @@ dict_subscript(PyObject *self, PyObject *key)
hash = _PyObject_HashFast(key);
if (hash == -1) {
dict_unhashtable_type(key);
dict_unhashable_type(key);
return NULL;
}
ix = _Py_dict_lookup_threadsafe(mp, key, hash, &value);
@ -4302,7 +4302,7 @@ dict_get_impl(PyDictObject *self, PyObject *key, PyObject *default_value)
hash = _PyObject_HashFast(key);
if (hash == -1) {
dict_unhashtable_type(key);
dict_unhashable_type(key);
return NULL;
}
ix = _Py_dict_lookup_threadsafe(self, key, hash, &val);
@ -4335,7 +4335,7 @@ dict_setdefault_ref_lock_held(PyObject *d, PyObject *key, PyObject *default_valu
hash = _PyObject_HashFast(key);
if (hash == -1) {
dict_unhashtable_type(key);
dict_unhashable_type(key);
if (result) {
*result = NULL;
}
@ -4764,7 +4764,7 @@ PyDict_Contains(PyObject *op, PyObject *key)
{
Py_hash_t hash = _PyObject_HashFast(key);
if (hash == -1) {
dict_unhashtable_type(key);
dict_unhashable_type(key);
return -1;
}
@ -6855,7 +6855,7 @@ _PyDict_SetItem_LockHeld(PyDictObject *dict, PyObject *name, PyObject *value)
if (value == NULL) {
Py_hash_t hash = _PyObject_HashFast(name);
if (hash == -1) {
dict_unhashtable_type(name);
dict_unhashable_type(name);
return -1;
}
return delitem_knownhash_lock_held((PyObject *)dict, name, hash);

View File

@ -212,7 +212,7 @@ set_add_entry(PySetObject *so, PyObject *key, Py_hash_t hash)
}
static void
set_unhashtable_type(PyObject *key)
set_unhashable_type(PyObject *key)
{
PyObject *exc = PyErr_GetRaisedException();
assert(exc != NULL);
@ -232,7 +232,7 @@ _PySet_AddTakeRef(PySetObject *so, PyObject *key)
{
Py_hash_t hash = _PyObject_HashFast(key);
if (hash == -1) {
set_unhashtable_type(key);
set_unhashable_type(key);
Py_DECREF(key);
return -1;
}
@ -401,7 +401,7 @@ set_add_key(PySetObject *so, PyObject *key)
{
Py_hash_t hash = _PyObject_HashFast(key);
if (hash == -1) {
set_unhashtable_type(key);
set_unhashable_type(key);
return -1;
}
return set_add_entry(so, key, hash);
@ -412,7 +412,7 @@ set_contains_key(PySetObject *so, PyObject *key)
{
Py_hash_t hash = _PyObject_HashFast(key);
if (hash == -1) {
set_unhashtable_type(key);
set_unhashable_type(key);
return -1;
}
return set_contains_entry(so, key, hash);
@ -423,7 +423,7 @@ set_discard_key(PySetObject *so, PyObject *key)
{
Py_hash_t hash = _PyObject_HashFast(key);
if (hash == -1) {
set_unhashtable_type(key);
set_unhashable_type(key);
return -1;
}
return set_discard_entry(so, key, hash);