Skip to content

Commit 9387f49

Browse files
committed
fixed bug with missing record finalization due to wrong parameter passing
1 parent d3a17f5 commit 9387f49

File tree

1 file changed

+10
-18
lines changed

1 file changed

+10
-18
lines changed

Source/Base/Spring.pas

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5489,17 +5489,9 @@ procedure TValueHelper.Free;
54895489
end;
54905490

54915491
class function TValueHelper.From(buffer: Pointer; typeInfo: PTypeInfo): TValue;
5492-
{$IFDEF CPUX86}
5493-
asm
5494-
jmp TValue.Make
5495-
end;
5496-
{$ELSE}
5497-
type
5498-
TValueMake = procedure(ABuffer: Pointer; ATypeInfo: PTypeInfo; var Result: TValue);
54995492
begin
5500-
TValueMake(@TValue.Make)(buffer, typeInfo, Result);
5493+
TValue.Make(buffer, typeInfo, Result);
55015494
end;
5502-
{$ENDIF}
55035495

55045496
class function TValueHelper.From(instance: TObject; classType: TClass): TValue;
55055497
begin
@@ -10272,6 +10264,15 @@ class function TArray.LastIndexOf<T>(const values: array of T; const item: T;
1027210264
Result := -1;
1027310265
end;
1027410266

10267+
procedure SwapPtr(var left, right);
10268+
var
10269+
temp: Pointer;
10270+
begin
10271+
temp := Pointer(left);
10272+
Pointer(left) := Pointer(right);
10273+
Pointer(right) := temp;
10274+
end;
10275+
1027510276
class procedure TArray.Swap<T>(var left, right: T);
1027610277
var
1027710278
temp: T;
@@ -10364,15 +10365,6 @@ class procedure TArray.Shuffle<T>(var values: array of T; index,
1036410365
end;
1036510366
end;
1036610367

10367-
procedure SwapPtr(var left, right);
10368-
var
10369-
temp: Pointer;
10370-
begin
10371-
temp := Pointer(left);
10372-
Pointer(left) := Pointer(right);
10373-
Pointer(right) := temp;
10374-
end;
10375-
1037610368
class function TArray.GetDepthLimit(count: Integer): Integer;
1037710369
begin
1037810370
Result := 0;

0 commit comments

Comments
 (0)