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_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to