extern(C) and name mangling
Jacob Carlborg
doob at me.com
Wed Dec 16 06:55:47 UTC 2020
On Wednesday, 16 December 2020 at 04:17:13 UTC, Mike Parker wrote:
> However, the D calling convention is defined to be identical to
> the C calling convention on the host system for everything
> except Windows x86.
Also keep in mind that D supports other types than C does, like D
arrays and delegates. In those cases the D calling convention
needs to be extended since there's no way to just relay on the C
calling convention. One could think it would be possible to
passes D arrays and delegates as structs, but that's not how DMD
passes them. On some platforms it matches how a struct is passed,
on some it doesn't.
--
/Jacob Carlborg
More information about the Digitalmars-d-learn
mailing list