[clang] [libclang/python] Derive library function types from annotations (PR #142120)

Vlad Serebrennikov via cfe-commits cfe-commits at lists.llvm.org
Sat Jun 7 01:04:32 PDT 2025


Endilll wrote:

> e.g. Python int maps to both c_int and c_uint

Good example, thank you. So the crux of the issue is that we need to reconstruct one kind of function prototype from another. On the one hand, type annotations are consumed (mostly) statically, while ctypes prototype is consumed dynamically, so it makes sense to write in the source what is consumed statically. But ctypes prototypes has more information, which we can't recover from type annotations.

Sadness

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


More information about the cfe-commits mailing list