Pointers to structures

ryuukk_ ryuukk_ at gmail.com
Fri Mar 19 14:30:01 UTC 2021


On Friday, 19 March 2021 at 13:15:16 UTC, novice3 wrote:
> On Friday, 19 March 2021 at 12:19:47 UTC, Cym13 wrote:
>> In D '.' can be used to access the member of a struct 
>> regardless of whether you are manipulating the struct itself 
>> or a pointer to that struct. So you can just write 
>> 'ptrStructVar.MemOfStructVar' and it will work without any 
>> issue.
>
> i guess, idea was to reduce manual work then adapt C sources to 
> D.
> i have similar wishes for "typedef ...".
> it is boring to rewrite it then making C binding.

Nobody needs to manually write bindings nowadays

https://github.com/jacob-carlborg/dstep

I use it to generate the bindings of the C headers libs i need

Works most of the time, sometimes i have to do some cleanup, but 
it's faster than doing all the thing manually

Alternatively one can use dpp https://github.com/atilaneves/dpp


More information about the Digitalmars-d mailing list