Repository: RustPython/RustPython (language: rust)

Issue:
Compile issue in aarch64
The type of `libc::c_char::MAX` is different on aarch64 which is `u8` however its `i8` in x86_64 systems
https://github.com/RustPython/RustPython/blob/01512e27a0c8c95d28e134e196b06530e3372540/stdlib/src/locale.rs#L41

Afte I changed the `i8` to `u8` it compiled without any issues.

```
ubuntu@instance-20230306-0019:~/rust/RustPython$ rustc --version
rustc 1.67.1 (d5a82bbd2 2023-02-07)
```

Tested commit id
`commit 01512e27a0c8c95d28e134e196b06530e3372540`


Discussion / hints:
@TheYkk Could you open a PR for the fix?

u8 will break x86 build. so just `0` will be fine if type is inferred by the second one. otherwise `0 as libc::c_char` will be better.

Fix patch:
diff --git a/stdlib/src/locale.rs b/stdlib/src/locale.rs
index 70d459f399..de7bb4fc91 100644
--- a/stdlib/src/locale.rs
+++ b/stdlib/src/locale.rs
@@ -38,7 +38,7 @@ mod _locale {
         }
 
         let mut ptr = group;
-        while ![0_i8, libc::c_char::MAX].contains(&*ptr) {
+        while ![0, libc::c_char::MAX].contains(&*ptr) {
             let val = vm.ctx.new_int(*ptr);
             group_vec.push(val.into());
             ptr = ptr.add(1);


Test patch: