Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 508b019

Browse filesBrowse files
committed
Delphi Tokyo complains about the lack of the [REF} annotation in DispInvoke
1 parent 922cbbe commit 508b019
Copy full SHA for 508b019

File tree

1 file changed

+14
-6
lines changed
Filter options

1 file changed

+14
-6
lines changed

‎PythonForDelphi/Components/Sources/Core/VarPyth.pas

Copy file name to clipboardExpand all lines: PythonForDelphi/Components/Sources/Core/VarPyth.pas
+14-6Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,13 @@ TPythonVariantType = class(TInvokeableVariantType, IVarInstanceReference)
182182
const AName: string): Boolean; override;
183183
function SetProperty(const V: TVarData; const AName: string;
184184
const Value: TVarData): Boolean; override;
185-
procedure DispInvoke(Dest: PVarData; const Source: TVarData;
186-
CallDesc: PCallDesc; Params: Pointer); override;
185+
{$IFDEF DELPHIXE7_OR_HIGHER}
186+
procedure DispInvoke(Dest: PVarData;
187+
[Ref] const Source: TVarData; CallDesc: PCallDesc; Params: Pointer);
188+
{$ELSE}
189+
procedure DispInvoke(Dest: PVarData;
190+
const Source: TVarData; CallDesc: PCallDesc; Params: Pointer);
191+
{$ENDIF}
187192
end;
188193

189194
var
@@ -931,9 +936,14 @@ procedure SetClearVarToEmptyParam(var V: TVarData);
931936
CPropertyGet = $02;
932937
CPropertySet = $04;
933938

934-
{$IFDEF USESYSTEMDISPINVOKE}
939+
{$IFDEF DELPHIXE7_OR_HIGHER}
935940
procedure TPythonVariantType.DispInvoke(Dest: PVarData;
936-
const Source: TVarData; CallDesc: PCallDesc; Params: Pointer);
941+
[Ref] const Source: TVarData; CallDesc: PCallDesc; Params: Pointer);
942+
{$ELSE}
943+
procedure TPythonVariantType.DispInvoke(Dest: PVarData;
944+
const Source: TVarData; CallDesc: PCallDesc; Params: Pointer);
945+
{$ENDIF}
946+
{$IFDEF USESYSTEMDISPINVOKE}
937947
{$IFDEF DELPHIXE2_OR_HIGHER}
938948
// Modified to correct memory leak QC102387
939949
procedure PatchedDispInvoke(Dest: PVarData;
@@ -1073,8 +1083,6 @@ TStringDesc = record
10731083
end;
10741084

10751085
{$ELSE USESYSTEMDISPINVOKE}
1076-
procedure TPythonVariantType.DispInvoke(Dest: PVarData;
1077-
const Source: TVarData; CallDesc: PCallDesc; Params: Pointer);
10781086
begin
10791087
DoDispInvoke(Dest, Source, CallDesc, Params);
10801088
end;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.