Skip to content
This repository has been archived by the owner on Jun 2, 2023. It is now read-only.

Commit

Permalink
Fix typo in Object/listobject.c (GH-21079)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeongukjae committed Jun 29, 2020
1 parent b30ee26 commit 5b96370
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Misc/NEWS.d/3.9.0a5.rst
Expand Up @@ -176,7 +176,7 @@ convention. Patch by Dong-hee Na.
.. section: Core and Builtins
Chaged list overallocation strategy. It no longer overallocates if the new
size is closer to overalocated size than to the old size and adds padding.
size is closer to overallocated size than to the old size and adds padding.

..
Expand Down
2 changes: 1 addition & 1 deletion Objects/listobject.c
Expand Up @@ -69,7 +69,7 @@ list_resize(PyListObject *self, Py_ssize_t newsize)
* is PY_SSIZE_T_MAX * (9 / 8) + 6 which always fits in a size_t.
*/
new_allocated = ((size_t)newsize + (newsize >> 3) + 6) & ~(size_t)3;
/* Do not overallocate if the new size is closer to overalocated size
/* Do not overallocate if the new size is closer to overallocated size
* than to the old size.
*/
if (newsize - Py_SIZE(self) > (Py_ssize_t)(new_allocated - newsize))
Expand Down

0 comments on commit 5b96370

Please sign in to comment.