Add offsetof() function
Open
- Dominant language
- Python
- Stars
- 6.6k
- Forks
- 1.9k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 33
Description
Alongside `sizeof()` and `alignment()` would it be possible to add `offsetof(struct, member)` that works in cross using the crazy magic?
Mesa needs to know these values for a struct it generates but currently has custom C code to determine them, so can't be used in cross builds.
Contributor guide
Research direction
Start by locating the existing sizeof() and alignment() functionality and the cross-compilation logic it uses. Determine how offsetof(struct, member) should expose offsets for generated structs, then verify that the result works for Mesa-style cross builds without requiring custom C code.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100