gh-143904: Raise OverflowError instead of IndexError for too large of… · python/cpython@bb93522 · GitHub
Skip to content

Commit bb93522

Browse files
gh-143904: Raise OverflowError instead of IndexError for too large offset in struct.pack_into()
1 parent 780e969 commit bb93522

4 files changed

Lines changed: 42 additions & 25 deletions

File tree

Lib/test/test_struct.py

Lines changed: 2 additions & 2 deletions
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
:func:`struct.pack_into` now raises OverflowError instead of IndexError for
2+
too large *offset* argument.

Modules/_struct.c

Lines changed: 7 additions & 14 deletions

Modules/clinic/_struct.c.h

Lines changed: 31 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)