You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: extract #define macro constants from C headers in specgen
The spec generation pipeline was losing #define constants because
clang -E preprocessing expanded them before c2ffi could see them.
Fix: parse original (pre-preprocessed) headers directly with regex
to extract #define NAME VALUE patterns. Store in spec as Macros map.
In idiomgen:
- extra_enums values auto-resolve from macros (header is authoritative)
- Unmatched macros generate as untyped constants in constants.go
This auto-extracts 154 EGL, 1819 GLES2, and 624 GLES3 constants from
headers. Examples updated to use package constants instead of local
magic values (EGL_VENDOR, GL_UNSIGNED_SHORT, GL_TIMEOUT_IGNORED, etc).
0 commit comments