[clang] [libclang/python] Do not rely on `ctypes`' `errcheck` (PR #105490)
Vlad Serebrennikov via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 12 10:16:53 PDT 2024
================
@@ -2454,7 +2480,7 @@ def element_type(self):
If accessed on a type that is not an array, complex, or vector type, an
exception will be raised.
"""
- result = conf.lib.clang_getElementType(self)
+ result = Type.from_result(conf.lib.clang_getElementType(self), (self,))
----------------
Endilll wrote:
We definitely has more leeway here now that `from_result` function doesn't need to satisfy `errcheck` interface. And I find repeated `self` confusing. But I suggest leaving this for a later PR. Let's do this one step at a time.
https://github.com/llvm/llvm-project/pull/105490
More information about the cfe-commits
mailing list