On Monday, 30 July 2018 at 22:40:21 UTC, Hakan Aras wrote:
Sorry if this is the wrong category.

Where in the druntime is m_init of TypeInfo_Class set? I'm trying to use extern(C++) classes with -betterC and I would like to initialize their members properly.

I don't think it is set in druntime, but rather directly emitted to the binary by the compiler as part of the object code generation. I'm not sure if this is right, but check https://github.com/dlang/dmd/blob/792fe5379af310cbd9348eca910cd5f8889d57ac/src/dmd/toobj.d#L368 Afterall, the initializer is static data, so there's no need to expend resources setting it at runtime.

Mike

Reply via email to