Skip to content

Commit 80b5307

Browse files
committed
Delphi 10.1 had still broken unsafe result
1 parent 76d9df3 commit 80b5307

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Source/Base/Spring.Comparers.pas

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ interface
3939
TDefaultGenericInterface = Generics.Defaults.TDefaultGenericInterface;
4040

4141
TComparer<T> = record
42-
class function Default: IComparer<T>; static; {$IFDEF DELPHIX_BERLIN_UP}unsafe;{$ENDIF}
42+
class function Default: IComparer<T>; static; {$IFDEF DELPHIX_TOKYO_UP}unsafe;{$ENDIF}
4343
end;
4444

4545
TEqualityComparer<T> = record
46-
class function Default: IEqualityComparer<T>; static; {$IFDEF DELPHIX_BERLIN_UP}unsafe;{$ENDIF}
46+
class function Default: IEqualityComparer<T>; static; {$IFDEF DELPHIX_TOKYO_UP}unsafe;{$ENDIF}
4747
end;
4848

4949
THashFunction = function(const key; len: Cardinal; seed: Integer = 0): Integer;
@@ -91,7 +91,7 @@ function SameGuid(const left, right: TGUID): Boolean;
9191

9292
class function TComparer<T>.Default: IComparer<T>;
9393
begin
94-
{$IFDEF DELPHIX_BERLIN_UP}
94+
{$IFDEF DELPHIX_TOKYO_UP}
9595
Pointer(Result) := _LookupVtableInfo(giComparer, TypeInfo(T), SizeOf(T));
9696
{$ELSE}
9797
Result := IComparer<T>(_LookupVtableInfo(giComparer, TypeInfo(T), SizeOf(T)));
@@ -100,7 +100,7 @@ class function TComparer<T>.Default: IComparer<T>;
100100

101101
class function TEqualityComparer<T>.Default: IEqualityComparer<T>;
102102
begin
103-
{$IFDEF DELPHIX_BERLIN_UP}
103+
{$IFDEF DELPHIX_TOKYO_UP}
104104
Pointer(Result) := _LookupVtableInfo(giEqualityComparer, TypeInfo(T), SizeOf(T));
105105
{$ELSE}
106106
Result := IEqualityComparer<T>(_LookupVtableInfo(giEqualityComparer, TypeInfo(T), SizeOf(T)));

0 commit comments

Comments
 (0)