unix/windows: Make sure that process exit code is portable 8-bit value.
This fixes FORCED_EXIT internal flag leaking into Windows exit code.
This commit is contained in:
parent
f04329e93b
commit
8427c5b76c
@ -440,7 +440,7 @@ int main(int argc, char **argv) {
|
|||||||
nlr_pop();
|
nlr_pop();
|
||||||
} else {
|
} else {
|
||||||
// uncaught exception
|
// uncaught exception
|
||||||
return handle_uncaught_exception((mp_obj_t)nlr.ret_val);
|
return handle_uncaught_exception((mp_obj_t)nlr.ret_val) & 0xff;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mp_obj_is_package(mod)) {
|
if (mp_obj_is_package(mod)) {
|
||||||
@ -504,7 +504,7 @@ int main(int argc, char **argv) {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
//printf("total bytes = %d\n", m_get_total_bytes_allocated());
|
//printf("total bytes = %d\n", m_get_total_bytes_allocated());
|
||||||
return ret;
|
return ret & 0xff;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint mp_import_stat(const char *path) {
|
uint mp_import_stat(const char *path) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user