[Lazarus] Breaking change
Michael Van Canneyt
michael at freepascal.org
Sun Jul 23 16:46:00 CEST 2017
On Sun, 23 Jul 2017, Martok via Lazarus wrote:
>
>>> { IUnknown }
>>> function QueryInterface({$IFDEF
>>> FPC_HAS_CONSTREF}constref{$ELSE}const{$ENDIF} IID: TGUID; out Obj): Hresult;
>>> virtual; {$IFNDEF WINDOWS}cdecl{$ELSE}stdcall{$ENDIF};
>>
>> That is a historical monstrosity :)
> I a gree we can do away with the IFDEFS and just use constref.
>
>>> But I see already it has been translated differently in every unit (mostly
>>> because MS made it uniform only after the headers were translated), so might as
>>> well use the new one to keep things interesting. Carry on.
>>
>> I agree the matter is a bit dubious :/
> I think it's really not. We can transparently use an interface name where a GUID
> is required for a reason, and that is part of why it's easier to write COM
> applications in Delphi than in MS compilers.
> Were your new definition applied globally and none of the APIs actually use the
> non-pointer type, we might as well get rid of that feature, as it'd be useless then.
>> The current definition makes it quite clear that it is in fact a pointer to a GUID.
> In MSDN hungarian notation terms, it is very obviously not: REFIID is
> notationally different from LPIID (or just plain *IID in argument lists).
Well, I prefer something less ambiguous, not relying on murky ABI agreements.
So I acted accordingly.
Michael.
More information about the Lazarus
mailing list