Commit 354fd100 authored by Stefan Behnel's avatar Stefan Behnel

When detecting an invalid system configuration for overflow checks, at least...

When detecting an invalid system configuration for overflow checks, at least print a warning, instead of leaving a dangling live exception behind.
parent ec5a7ff2
......@@ -47,8 +47,12 @@ static int __Pyx_check_twos_complement(void) {
#define __Pyx_div_const_no_overflow(a, b, overflow) ((a) / (b))
/////////////// Common.init ///////////////
//@substitute: naming
__Pyx_check_twos_complement();
// FIXME: Propagate the error here instead of just printing it.
if (unlikely(__Pyx_check_twos_complement())) {
PyErr_WriteUnraisable($module_cname);
}
/////////////// BaseCaseUnsigned.proto ///////////////
......@@ -226,8 +230,12 @@ static CYTHON_INLINE {{INT}} __Pyx_div_{{NAME}}_checking_overflow({{INT}} a, {{I
/////////////// SizeCheck.init ///////////////
//@substitute: naming
__Pyx_check_sane_{{NAME}}();
// FIXME: Propagate the error here instead of just printing it.
if (unlikely(__Pyx_check_sane_{{NAME}}())) {
PyErr_WriteUnraisable($module_cname);
}
/////////////// SizeCheck.proto ///////////////
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment