[clang] Add comments and macros support to Python bindings (PR #81684)

Jannick Kremer via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 24 04:40:16 PST 2026


================
@@ -4204,6 +4268,187 @@ def set_property(self, property, value):
 cursor_visit_callback = CFUNCTYPE(c_int, Cursor, Cursor, py_object)
 fields_visit_callback = CFUNCTYPE(c_int, Cursor, py_object)
 
+
+class CXTranslationUnitImpl(Structure):
+    pass  # opaque structure
+
+
+CXTranslationUnit = POINTER(CXTranslationUnitImpl)
----------------
DeinAlptraum wrote:

Are you sure these are necessary?
If we don't need to access the fields on Python side, it should be enough to inherit from `ClangObject` instead of `Structure` iirc

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


More information about the cfe-commits mailing list