[libc] Fix hdrgen to be compatible with Python 3.8 (#127265)

This commit is contained in:
Roland McGrath
2025-02-14 13:51:14 -08:00
committed by GitHub
parent da6ac9564b
commit dcfc30ca6b

View File

@@ -23,14 +23,12 @@ STDINT_SIZES = [
"ptr",
]
COMPILER_HEADER_TYPES = (
{
"bool": "<stdbool.h>",
"va_list": "<stdarg.h>",
}
| {f"int{size}_t": "<stdint.h>" for size in STDINT_SIZES}
| {f"uint{size}_t": "<stdint.h>" for size in STDINT_SIZES}
)
COMPILER_HEADER_TYPES = {
"bool": "<stdbool.h>",
"va_list": "<stdarg.h>",
}
COMPILER_HEADER_TYPES.update({f"int{size}_t": "<stdint.h>" for size in STDINT_SIZES})
COMPILER_HEADER_TYPES.update({f"uint{size}_t": "<stdint.h>" for size in STDINT_SIZES})
class HeaderFile: