Skip to content

Commit

Permalink
fix compiler warning on 32 bit platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
ngoldbaum authored and davidhewitt committed Nov 5, 2024
1 parent a76ce14 commit 02b8dfe
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions examples/string-sum/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ unsafe fn parse_arg_as_i32(obj: *mut PyObject, n_arg: usize) -> Option<i32> {
let mut overflow = 0;
let i_long: c_long = PyLong_AsLongAndOverflow(obj, &mut overflow);

#[allow(irrefutable_let_patterns)] // some platforms have c_long equal to i32
if overflow != 0 {
raise_overflowerror(obj);
None
Expand Down

0 comments on commit 02b8dfe

Please sign in to comment.