version and extern problems
torhu
fake at address.dude
Tue Jul 10 08:52:38 PDT 2007
Mike Parker wrote:
> Walter Bright wrote:
>> Georg Wrede wrote:
>>> Why not
>>>
>>> extern(ecc) void function() foo;
>>>
>>> where ecc would resolve to Windows or C.
>>>
>>> This of course requires some tweaking of the compiler, but it might be
>>> worth it.
>>
>> Do you mean "ecc" being a magic identifier that the compiler sets to
>> Windows on Windows, and C otherwise? That might be a pretty good idea.
>> Why "ecc", though? It doesn't jump out at me what it might mean.
>>
>> How about "System" ?
>
> Please :) This looks like a great solution. And extern(System) is intuitive.
Yes, but what the Pascal convention? And the windows API uses more then
those three conventions, too. This system isn't very flexible in case
other platforms start using more than one convention.
Maybe Windows and Pascal could just 'degrade' into C on other platforms
than windows?
Or allowing several possibilities:
extern (Windows, C)
Windows is picked on Windows, C on other platforms. This allows you to
control what happens.
More information about the Digitalmars-d
mailing list