Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Update Objects/dictobject.c
Co-authored-by: Sam Gross <colesbury@gmail.com>
  • Loading branch information
corona10 and colesbury authored Jan 19, 2024
commit b2d4606a254ed5b10c46329c4a6aed18d3720c16
4 changes: 3 additions & 1 deletion Objects/dictobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -2467,7 +2467,9 @@ dict_dealloc(PyObject *self)
}
#ifdef WITH_FREELISTS
struct _Py_dict_state *state = get_dict_state();
if (state->numfree < PyDict_MAXFREELIST && state->numfree >=0 && Py_IS_TYPE(mp, &PyDict_Type)) {
if (state->numfree < PyDict_MAXFREELIST && state->numfree >=0 &&
Py_IS_TYPE(mp, &PyDict_Type))
{
state->free_list[state->numfree++] = mp;
OBJECT_STAT_INC(to_freelist);
}
Expand Down