White-Oak / qml-rust

QML (Qt Quick) bindings for Rust language
MIT License
205 stars 18 forks source link

Replace explicit i8 with libc::c_char, to allow it to compile on ARM. #35

Closed Thra11 closed 7 years ago

Thra11 commented 7 years ago

Despite the docs saying that libc::c_char is equivalent to i8, it would appear that libc::c_char actually follows the idiosyncracies of the C char type that it represents. That is, on some platforms it is equivalent to signed char (i8) and on others it is unsigned char (u8). By explicitly using libc::c_char in the stoptr and ptrtos functions, we avoid mismatched type errors when compiling on ARM.

Thra11 commented 7 years ago

I've only tested this on ARM.

I'm also very new to rust, so it's more of a, "this seems to work for me" change than, "I know this is how it should be done".

White-Oak commented 7 years ago

@Thra11 seems to work. Were there any more steps to be able to build it for ARM?

Thra11 commented 7 years ago

No. That was the only change required.