https://bugs.llvm.org/show_bug.cgi?id=45499

            Bug ID: 45499
           Summary: CXUnsavedFile and CXTUResourceUsageEntry use unsigned
                    long
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: libclang
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected]

CXUnsavedFile and CXTUResourceUsageEntry are currently using `unsigned long`
for fields they contain.

`long` does not have a consistent size between Windows and Unix and this makes
it difficult to create generic bindings over the provided C API.

In particular, `long` is always 32-bits on Windows but it is pointer sized on
Unix systems. This also means that Windows is more limited in how the structs
can be used.

Ideally, these would be updated to be `size_t` so that it is pointer sized on
all platforms. This would also allow higher level languages, such as C#, to
provide a single consistent binding using their own `size_t` equivalent.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to