Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
skirpichev authored Jan 15, 2025
1 parent 035c772 commit 9d95c35
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Python/marshal.c
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@ w_PyLong(const PyLongObject *ob, char flag, WFILE *p)

/* must be a multiple of PyLong_MARSHAL_SHIFT */
assert(layout->bits_per_digit % PyLong_MARSHAL_SHIFT == 0);
assert(layout->bits_per_digit >= PyLong_MARSHAL_SHIFT);

/* other assumptions on PyLongObject internals */
assert(layout->bits_per_digit <= 32);
Expand Down Expand Up @@ -996,6 +997,7 @@ r_PyLong(RFILE *p)

/* must be a multiple of PyLong_MARSHAL_SHIFT */
assert(layout->bits_per_digit % PyLong_MARSHAL_SHIFT == 0);
assert(layout->bits_per_digit >= PyLong_MARSHAL_SHIFT);

/* other assumptions on PyLongObject internals */
assert(layout->bits_per_digit <= 32);
Expand Down

0 comments on commit 9d95c35

Please sign in to comment.