Commit 785b4d9
committed
gh-158585: Don't overallocate at first PyBytesWriter_Resize()
PyBytesWriter_Resize() and PyBytesWriter_Grow() no longer
overallocate when the first bytes/bytearray object is allocated.
Only overallocate bytes objects at next PyBytesWriter_Resize() and
PyBytesWriter_Grow() calls.1 parent ab01d18 commit 785b4d9
2 files changed
Lines changed: 17 additions & 5 deletions
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3755 | 3755 | | |
3756 | 3756 | | |
3757 | 3757 | | |
3758 | | - | |
3759 | | - | |
3760 | | - | |
| 3758 | + | |
| 3759 | + | |
| 3760 | + | |
| 3761 | + | |
| 3762 | + | |
| 3763 | + | |
| 3764 | + | |
3761 | 3765 | | |
3762 | | - | |
3763 | 3766 | | |
3764 | | - | |
3765 | 3767 | | |
3766 | 3768 | | |
3767 | 3769 | | |
| |||
3784 | 3786 | | |
3785 | 3787 | | |
3786 | 3788 | | |
| 3789 | + | |
| 3790 | + | |
| 3791 | + | |
| 3792 | + | |
| 3793 | + | |
| 3794 | + | |
3787 | 3795 | | |
3788 | 3796 | | |
3789 | 3797 | | |
| |||
0 commit comments