ImportC can now automatically run the preprocessor
Adrian Matoga
dlang.spam at matoga.info
Wed May 18 20:31:06 UTC 2022
On Monday, 16 May 2022 at 03:12:47 UTC, Walter Bright wrote:
> On 5/15/2022 6:41 PM, Adam D Ruppe wrote:
>> On Monday, 16 May 2022 at 01:05:33 UTC, Walter Bright wrote:
>>> But what is missing is a compelling use case for it?
>>
>> It is the only way I've seen that would let you ACTUALLY use
>> full C APIs.
>
> This is replacing C #define's with D constructions, right?
>
> You're right, ImportC does not do that at the moment. However,
> it's always been the plan for it to gather up all the
> #define's, and replace the ones that can be replaced with D
> constructs, and ignore the rest.
That will be very handy of course and some users may heavily
demand it, but at the before-ImportC times, when I dreamt of
having a C frontend integrated with D compiler, I assumed it'd be
good enough if I could just write a one line wrapper function in
the C file to call the ugly macro, for anything that's not
auto-convertible to plain enum constant.
More information about the Digitalmars-d
mailing list