Closed aesteve-rh closed 11 months ago
@Gnurou This is just a proposal, I wanted to know your opinion before doing this for other structs.
The idea is to allow a more friendly name for accessing the union members, as for an anonymous struct/union, bindgen gives some arguably ugly names. Also, improves the safety of using the structs, as only the member of the struct that gets initialized by the driver is returned (based on the index).
Thank you! Yes, we need more of these safe accessors for the bindings. I'm happy to merge this, but please see the inline comments for a couple of nits.
Thanks for the feedback!
I've addressed all your comments, did the same for frmsizes
, and will ready the PR up.
Thank you! It's perfect. :+1:
Add an accessor for
v4l2_frmivalenum
anonymous union members, avoiding having to write the union name and safely returning the appropriate member of the union that is used.