Calling C functions

Steven Schveighoffer schveiguy at gmail.com
Tue Jun 30 12:22:15 UTC 2020


On 6/30/20 3:00 AM, Kagamin wrote:
> On Monday, 29 June 2020 at 19:55:59 UTC, Steven Schveighoffer wrote:
>> Yep, for sure. I'll file an issue. Anyone know why the calling 
>> convention would differ?
> 
> It's easier to enforce left to right evaluation order this way: 
> arguments are pushed to stack as they are evaluated, which is pascal 
> calling convention.

Easier, or more efficient? The cost seems high if it doesn't provide any 
efficiency benefits (i.e. one cannot use extern(D) functions for C 
callbacks).

In any case, I filed an issue: 
https://issues.dlang.org/show_bug.cgi?id=20993

-Steve


More information about the Digitalmars-d-learn mailing list