How to use a function without their sources

nazriel spam at dzfl.pl
Fri Jan 18 10:31:30 PST 2013


On Friday, 18 January 2013 at 18:23:57 UTC, nazriel wrote:
> On Friday, 18 January 2013 at 18:18:07 UTC, Andrej Mitrovic 
> wrote:
>> On 1/18/13, nazriel <spam at dzfl.pl> wrote:
>>> extern(C) void _D3lib3fooFZv();
>>>
>>> void main() {
>>> 	_D3lib3fooFZv();
>>> }
>>
>> That's a *terrible* idea, you are calling a D function using 
>> the C
>> convention, you're going to have all sorts of problems. 
>> extern(D) is
>> not just used for mangling, it's also used for designating how
>> parameters are passed to and results are returned from a 
>> function (via
>> stack/registers). E.g.:
>>
>
> Oh really?
> Thanks, I didn't know.

As a disclaimer, I did know about this.
I wasn't serious by posting this example. So don't take this 
serious.

I just used objdump to get mangled name. ^^


More information about the Digitalmars-d-learn mailing list