mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-12-24 20:20:36 +01:00
* always pass property value by value to the property setter of a method, the optimization (to prevent copying) to pass just the reference doesn't work on arm, for example (bug 8273)
git-svn-id: trunk@6370 -
This commit is contained in:
parent
62b810700a
commit
d87dc4e3f8
@ -1453,8 +1453,8 @@ end;
|
|||||||
|
|
||||||
Procedure SetMethodProp(Instance : TObject;PropInfo : PPropInfo; const Value : TMethod);
|
Procedure SetMethodProp(Instance : TObject;PropInfo : PPropInfo; const Value : TMethod);
|
||||||
type
|
type
|
||||||
TSetMethodProcIndex=procedure(index:longint;p:PMethod) of object;
|
TSetMethodProcIndex=procedure(index:longint;p:TMethod) of object;
|
||||||
TSetMethodProc=procedure(p:PMethod) of object;
|
TSetMethodProc=procedure(p:TMethod) of object;
|
||||||
var
|
var
|
||||||
AMethod : TMethod;
|
AMethod : TMethod;
|
||||||
begin
|
begin
|
||||||
@ -1470,9 +1470,9 @@ begin
|
|||||||
AMethod.Code:=PPointer(Pointer(Instance.ClassType)+Ptrint(PropInfo^.SetProc))^;
|
AMethod.Code:=PPointer(Pointer(Instance.ClassType)+Ptrint(PropInfo^.SetProc))^;
|
||||||
AMethod.Data:=Instance;
|
AMethod.Data:=Instance;
|
||||||
if ((PropInfo^.PropProcs shr 6) and 1)<>0 then
|
if ((PropInfo^.PropProcs shr 6) and 1)<>0 then
|
||||||
TSetMethodProcIndex(AMethod)(PropInfo^.Index,@Value)
|
TSetMethodProcIndex(AMethod)(PropInfo^.Index,Value)
|
||||||
else
|
else
|
||||||
TSetMethodProc(AMethod)(@Value);
|
TSetMethodProc(AMethod)(Value);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user