8000 Fix typo in Object/listobject.c by jeongukjae · Pull Request #21079 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

Fix typo in Object/listobject.c #21079

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 29, 2020
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
2 changes: 1 addition & 1 deletion Misc/NEWS.d/3.9.0a5.rst
Original file line number Diff line number Diff line change
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
5FEF
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,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