-
Notifications
You must be signed in to change notification settings - Fork 19
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
Integer suffixes discarded #16
Comments
It's the |
@jethrogb, I'm interested in taking this on, as the downstream issue referenced above is becoming a major blocker. From my understanding, the issue is mainly that the If we were to pass that information downstream, we'd want to return more than just the raw value -- perhaps a richer return type. I was thinking a
What are your thoughts? I figure if we can kick off by agreeing on a return type now, it'll make the actual programming easier. |
That looks good, except I wonder about the compilation-target compatibility of Minor comments: since you're using the signed magnitude representation, let's name the fields appropriately. Also, I think using an enum for the type length is going to make writing operations easier. struct Integer {
sign: bool,
magnitute: u128,
unsigned: bool,
len: IntegerLength,
}
enum IntegerLength {
NotLong,
Long,
LongLong
} |
@jethrogb We could probably just select |
@jethrogb / @mbestavros : We should also probably have a |
What is the purpose of the radix? |
So that we can recreate the exact bytes that were used in the source. This can help in various debugging scenarios. If we're going to avoid discarding information we shouldn't discard any. |
That doesn't really make sense, the same type needs to be able to represent both a literal and an evaluated expression. What is the radix of |
What is the Combining parsing and evaluation is bad mojo. |
Feel free to rewrite the entire crate. |
Sorry, didn't mean to come across as cheeky. We can do without the radix. |
Generally we want to have a precise type map between C and Rust. The problem we encountered is when we try to convert a positive number in C, we want to have a signed integer, i32 or i64, but we get a u32 directly.
Reference to the issue:rust-lang/rust-bindgen#1594
I'm not sure yet but will this be the part that generate the final result?
The text was updated successfully, but these errors were encountered: