extern(C) in druntime

Dicebot via Digitalmars-d digitalmars-d at puremagic.com
Tue Nov 11 08:01:30 PST 2014


On Monday, 10 November 2014 at 23:22:00 UTC, Sean Kelly wrote:
> On Monday, 10 November 2014 at 23:08:55 UTC, Logan Capaldo 
> wrote:
>>
>> So just to be clear, there are _some_ legitimate uses of 
>> extern (C) in druntime, yes? rt_init/rt_term, rt_loadLibrary, 
>> thread_init(? think this one can be bootstrapped from D code), 
>> ...?
>
> Yes.  There are a few functions meant to be callable from C 
> code: rt_init, rt_term, thread_attachThis, thread_detachThis, 
> etc.  These could either be exposed as wrappers on top of 
> extern (D) functions or left as-is.

Well this is exactly what makes somewhat uneasy about making the 
change myself - it isn't immediately obvious which functions are 
legitimately extern(C) and which have it only for mangling / 
forward declaration.


More information about the Digitalmars-d mailing list