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

via libc-commits libc-commits at lists.llvm.org
Fri Feb 14 13:46:06 PST 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libc

Author: Roland McGrath (frobtech)

<details>
<summary>Changes</summary>



---
Full diff: https://github.com/llvm/llvm-project/pull/127265.diff


1 Files Affected:

- (modified) libc/utils/hdrgen/header.py (+6-8) 


``````````diff
diff --git a/libc/utils/hdrgen/header.py b/libc/utils/hdrgen/header.py
index c817c02b83b75..b03535ce90bfc 100644
--- a/libc/utils/hdrgen/header.py
+++ b/libc/utils/hdrgen/header.py
@@ -23,14 +23,12 @@
     "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:

``````````

</details>


https://github.com/llvm/llvm-project/pull/127265


More information about the libc-commits mailing list