Add additional helpers to bitmask data structure
Closes #2674
@y86-dev Can you confirm that this resolves your issue? Now that it's passing CI, I think it's ready for review.
@ojeda @emilio Also feel free to let me know if you have any feedback.
Hi, thanks for working on this! I tried your branch with the kernel repo and the code seems to look like what we would want, but I have a couple notes:
- in the kernel, we don't have
std(and I would imagine that many users ofbindgenwould not want to rely on having it, do you test for this in your CI?) and thus the generated code doesn't compile. The fix is probably to just replacestdwithcore. - I am not so sure if my initial naming suggestion was the best, at the moment I like
field_rawbetter thanraw_fieldfor the raw getter, the setter name seems fine to me, but if you think making itset_field_raw, then that also seems good to me.
Otherwise the code looks good to me, maybe Miguel finds something else. Also cc @nbdd0121, it might be a good idea to let him also take a look.
Hi, thanks for working on this! I tried your branch with the kernel repo and the code seems to look like what we would want, but I have a couple notes:
1. in the kernel, we don't have `std` (and I would imagine that many users of `bindgen` would not want to rely on having it, do you test for this in your CI?) and thus the generated code doesn't compile. The fix is probably to just replace `std` with `core`.
Whoops, I saw that bindgen used std in generated code, but it must be feature flagged. Regardless, I can see how that would be undesirable. I'll fix that up.
2. I am not so sure if my initial naming suggestion was the best, at the moment I like `field_raw` better than `raw_field` for the raw getter, the setter name seems fine to me, but if you think making it `set_field_raw`, then that also seems good to me.
Okay I'll change it!
Otherwise the code looks good to me, maybe Miguel finds something else. Also cc @nbdd0121, it might be a good idea to let him also take a look.
I tested it again and it LGTM, thanks!
@pvdrz Hi! This PR is ready I think assuming @ojeda is okay with it.