-
Notifications
You must be signed in to change notification settings - Fork 729
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when using unicode character literals #2475
Comments
We can prevent the error by modifying let (type_kind, val) = match value {
...
EvalResult::Char(c) => {
let c = match c {
CChar::Char(c) => c as u64,
CChar::Raw(c) => c,
};
if c <= ::std::u8::MAX as u64 {
(TypeKind::Int(IntKind::U8), VarType::Char(c as u8))
} else {
assert!(c <= ::std::u32::MAX as u64);
(TypeKind::Int(IntKind::U32), VarType::Int(c as i64))
}
}
...
} But this makes |
It seems like I have to modify |
I suspect this could be fixed by #2369 |
I posted an issue for this: reitermarkus/cmacro-rs#3 |
bindgen
panics when it encounters a character literal with a Unicode escape sequence representing a codepoint greater than 128.Input C/C++ Header
Bindgen Invocation
Actual Results
Expected Results
The text was updated successfully, but these errors were encountered: