Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
vstinner committed Nov 12, 2023
1 parent 7596d95 commit 9ec6aa4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Modules/_functoolsmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -1088,7 +1088,7 @@ bounded_lru_cache_wrapper(lru_cache_object *self, PyObject *args, PyObject *kwds
We created one other reference when the link was created.
The linked list only has borrowed references. */
if (_PyDict_Pop_KnownHash((PyDictObject*)self->cache, link->key,
link->hash, Py_None, &popresult) < 0) {
link->hash, Py_None, &popresult) < 0) {
/* An error arose while trying to remove the oldest key (the one
being evicted) from the cache. We restore the link to its
original position as the oldest link. Then we allow the
Expand Down
1 change: 1 addition & 0 deletions Modules/_threadmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -969,6 +969,7 @@ local_clear(localobject *self)
if (tstate->dict) {
PyObject *v;
if (PyDict_Pop(tstate->dict, self->key, Py_None, &v) < 0) {
// Silently ignore error
PyErr_Clear();
}
else {
Expand Down

0 comments on commit 9ec6aa4

Please sign in to comment.