| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
First round of comments on the C side. I'll do the Python files now.
Sorry, something went wrong.
There was a problem hiding this comment.
The way you construct the layout depends on whether it's a union or a struct and whether it's gcc or ms layout. I'm not sure whether it's easier to maintain one huge function or if you want to create separate factories. AFACIT, it could be easier for instance to have a function that determines whether it's a gcc layout or not, one function that is responsible for parsing _align_ and one function responsible for the _pack_ attribute. For the rest, they can be kept inside the get_layout function.
For the loop over the input fields, I don't know whether you want to keep a single one or factor it out (it could be clearer to review, but it will likely cause more code so I'm fine with the current implementation).
Sorry, something went wrong.
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
There was a problem hiding this comment.
Thank you for the review!
Sorry, something went wrong.
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
|
Thank you for the reviews! |
Sorry, something went wrong.
|
RC2 is delayed. I'll merge now, if buildbots pass. |
Sorry, something went wrong.
The "now" being in at least 8 hours 😆 |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
As discussed in #97702, moving this logic to Python should make it easier to fix the various struct layout bugs in ctypes.
This PR should be strictly a refactoring of the code in main, except the _ctypes.CField class can now be instantiated from Python.