CppSharp icon indicating copy to clipboard operation
CppSharp copied to clipboard

ptrdiff_t / size_t data types issue? (and long / ulong)

Open SuRGeoNix opened this issue 1 year ago • 2 comments

In my case it looks in vcruntime.h which includes:

#ifdef _WIN64
    typedef unsigned __int64 size_t;
    typedef __int64          ptrdiff_t;
    typedef __int64          intptr_t;
#else
    typedef unsigned int     size_t;
    typedef int              ptrdiff_t;
    typedef int              intptr_t;
#endif

and it gives me a qualified type (in x64 win case) LongLong which is wrong it should be IntPtr / nint?

Similarly for size_t it should be nuint and for long/ulong to use CLong / CULong.

SuRGeoNix avatar Jul 06 '24 17:07 SuRGeoNix

Looks like I missed this issue previously, did you made any progress in figuring out your issue?

tritao avatar Jul 26 '24 15:07 tritao

@tritao I manually changing the types for now, just thought that this should be handle at lower level from CppSharp?

SuRGeoNix avatar Jul 26 '24 16:07 SuRGeoNix