Skip to content

Commit e814029

Browse files
author
andrey.gruzdev
committed
Free Pascal 2.6 compatibility
1 parent b72e618 commit e814029

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

PythonForDelphi/Components/Sources/Core/WrapDelphi.pas

+7-1
Original file line numberDiff line numberDiff line change
@@ -486,9 +486,15 @@ TPyDelphiIterator = class(TPyObject)
486486
TPyInterfacedObject = class(TPyObject, IInterface)
487487
private
488488
// implementation of interface IInterface
489+
{$IFDEF FPC_HAS_CONSTREF}
490+
function QueryInterface(constref IID: TGUID; out Obj): HResult; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
491+
function _AddRef: Integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
492+
function _Release: Integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
493+
{$ELSE}
489494
function QueryInterface(const IID: TGUID; out Obj): HResult; stdcall;
490495
function _AddRef: Integer; stdcall;
491496
function _Release: Integer; stdcall;
497+
{$ENDIF}
492498
end;
493499

494500
{
@@ -1393,7 +1399,7 @@ function TPyInterfacedObject._Release: Integer;
13931399
Result := -1;
13941400
end;
13951401

1396-
function TPyInterfacedObject.QueryInterface(const IID: TGUID;
1402+
function TPyInterfacedObject.QueryInterface({$IFDEF FPC_HAS_CONSTREF}constref{$ELSE}const{$ENDIF} IID: TGUID;
13971403
out Obj): HResult;
13981404
begin
13991405
if GetInterface(IID, Obj) then

0 commit comments

Comments
 (0)