Linking D with C structs
kinke
kinke at gmx.net
Mon Jun 29 10:44:16 UTC 2020
On Monday, 29 June 2020 at 06:29:38 UTC, Anthony wrote:
> What does "__initZ" refer to?
> Does this refer to automatic initialization like "this()"?
Almost, it's the static initializer for that struct, which is
omitted because you apparently don't compile/link the module
containing the struct declaration. Initialize the char array with
zeros (= 0) to make the struct fully zero-initialized, preventing
the need for that symbol. chars in D are initialized with 0xFF,
unlike byte and ubyte.
More information about the Digitalmars-d-learn
mailing list