Function with C calling convention but D mangling

Jacob Carlborg doob at me.com
Fri Dec 27 07:00:49 PST 2013


On 2013-12-23 12:20, Benjamin Thaut wrote:

> Yes it would, but then I would have to define some mangling for myself.

You can do something like this:

void foo ();

extern (C) pragma(mangle, foo.mangleof) void foo () { }

I'm pretty sure you remove the duplication with a mixin.

-- 
/Jacob Carlborg


More information about the Digitalmars-d-learn mailing list