Skip to content

Conversation

@herrernst
Copy link
Contributor

Fix for #5

on arm, c char is u8
@mvdnes
Copy link
Owner

mvdnes commented Jan 2, 2016

Does this also work with as const *u8? I like to be as explicit as possible when it comes to raw pointer casts.

@herrernst
Copy link
Contributor Author

You mean as *const u8, don't you? Otherwise, I get "expected identifier, found keyword const".

@mvdnes
Copy link
Owner

mvdnes commented Jan 2, 2016

Ah yes, that was what I meant.

@herrernst
Copy link
Contributor Author

No. It then compiles on ARM, but not on x64 anymore. If you want to be explicit, maybe you can use a std::os::raw::c_char?
I've created another branch where I do it, and then it works on arm and x64. But I warn you, I really don't know what I am doing! ;)

Update - some discussion:
rust-lang/rust#29775
rust-lang/rust#29867
https://users.rust-lang.org/t/rust-cross-compilation-errors-while-native-compilation-is-successful/4008

@herrernst
Copy link
Contributor Author

Okay, std::os::raw::c_char is most probably the correct type, as it is the type that from_ptr expects. I've opened another pull request with the correct change.

@herrernst herrernst closed this Jan 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants