Skip to content

Commit

Permalink
Fix decref
Browse files Browse the repository at this point in the history
  • Loading branch information
mejrs committed Oct 8, 2023
1 parent b3e7a29 commit b347fad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/string-sum/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ unsafe fn raise_overflowerror(obj: *mut PyObject) {
size as usize,
));
let msg = format!("cannot fit {s} in 32 bits\0");
Py_DECREF(obj_repr);

PyErr_SetString(PyExc_OverflowError, msg.as_ptr().cast::<c_char>());
}
Py_DECREF(obj_repr);
}
}

Expand Down

0 comments on commit b347fad

Please sign in to comment.