Thread overview
importC reflection bugs
Feb 26
Dakota
Feb 27
Dakota
February 26

I want to use importC reflection c header then generate D interface.

one problem I can not workaround is to determine size_t ptrdiff_t uintptr_t, they become ulong, long, ulong.

I need a method to let the D CTFE know the imported C type original type( size_t but not ulong). Is this possible?

February 26
On 2/26/2024 6:07 AM, Dakota wrote:
> I want to use importC reflection c header then generate D interface.
> 
> one problem I can not workaround is to determine `size_t` `ptrdiff_t` `uintptr_t`, they become `ulong`, `long`, `ulong`.
> 
> 
> I need a method to let the D CTFE know the imported C type original type( `size_t` but not `ulong`).  Is this possible?


Currently there is not a way to do that. ImportC eagerly resolves typedefs.
February 27
On Monday, 26 February 2024 at 17:10:13 UTC, Walter Bright wrote:
> On 2/26/2024 6:07 AM, Dakota wrote:
>> I want to use importC reflection c header then generate D interface.
>> 
>> one problem I can not workaround is to determine `size_t` `ptrdiff_t` `uintptr_t`, they become `ulong`, `long`, `ulong`.
>> 
>> 
>> I need a method to let the D CTFE know the imported C type original type( `size_t` but not `ulong`).  Is this possible?
>
>
> Currently there is not a way to do that. ImportC eagerly resolves typedefs.

Right now I plan to fix it by hand,  can we add a feature enhancement for this case?