[fpc-pascal] Re: Free Pascal 2.6.0 released!
Jonas Maebe
jonas.maebe at elis.ugent.be
Mon Jan 2 00:43:50 CET 2012
On 02 Jan 2012, at 00:32, Marvin Cohrs wrote:
> Changelog:
>> IInterface.QueryInterface, ._AddRef and ._Release definitions have been changed
>> Old behaviour: The IInterface.QueryInterface, ._AddRef and ._Release methods were defined stdcall and the IID was passed as const.New behaviour: These methods are defined stdcall on Windows and cdecl on the other operating systems. The IID parameter has become a constref.
>
> I think, it's really ugly to always use ifdef/ifndef directives when
> overriding those methods. What's about introducing a 'nativecall'
> convention,
> which means 'stdcall' on windoze and 'cdecl' on other operating systems?
You can actually do that yourself, if you wish:
{$macro on}
{$ifdef windows}
{$define nativecall:=stdcall}
{$else}
{$define nativecall:=cdecl}
{$endif}
and then you can use "nativecall".
Jonas
More information about the fpc-pascal
mailing list