Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions Objects/dictobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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;
}

Expand Down Expand Up @@ -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;
}
Expand All @@ -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;
}
Expand Down Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}

Expand Down Expand Up @@ -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);
Expand Down
10 changes: 5 additions & 5 deletions Objects/setobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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;
}
Expand Down Expand Up @@ -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);
Expand All @@ -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);
Expand All @@ -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);
Expand Down
Loading