Skip to content

Commit ed44938

Browse files
committed
fix: filter __builtin_ types, install numpy in CI
1 parent 6f6eebe commit ed44938

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

.github/workflows/test.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ jobs:
9191
# Install clang2 package version matching system libclang
9292
uv pip install --system "clang2==${LLVM_MAJOR_VERSION}.*"
9393
94+
- name: Install numpy for test headers (Linux)
95+
if: runner.os == 'Linux'
96+
run: uv pip install --system numpy
97+
9498
- name: Test all backends (Linux)
9599
if: runner.os == 'Linux'
96100
run: pytest ./test

autopxd/backends/libclang_backend.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1253,6 +1253,12 @@ def _process_typedef(self, cursor: "clang.cindex.Cursor") -> None:
12531253

12541254
underlying = cursor.underlying_typedef_type
12551255

1256+
# Skip typedefs that reference compiler builtin types
1257+
# These are internal to GCC/Clang and cannot be used in Cython
1258+
underlying_spelling = underlying.spelling
1259+
if underlying_spelling.startswith("__builtin_"):
1260+
return
1261+
12561262
# Special handling for struct/union typedefs that have inline definitions
12571263
# e.g., typedef struct foo { int x; } foo_t;
12581264
# We need to emit the struct definition first, then the typedef

0 commit comments

Comments
 (0)