|
@@ -21,6 +21,8 @@ function ReturnResultInParam(aType: PTypeInfo): Boolean;
|
|
var
|
|
var
|
|
td: PTypeData;
|
|
td: PTypeData;
|
|
begin
|
|
begin
|
|
|
|
+ { Only on Win32 structured types of sizes 1, 2 and 4 are returned directly
|
|
|
|
+ instead of a result parameter }
|
|
Result := False;
|
|
Result := False;
|
|
if Assigned(aType) then begin
|
|
if Assigned(aType) then begin
|
|
case aType^.Kind of
|
|
case aType^.Kind of
|
|
@@ -33,12 +35,20 @@ begin
|
|
tkDynArray:
|
|
tkDynArray:
|
|
Result := True;
|
|
Result := True;
|
|
tkArray: begin
|
|
tkArray: begin
|
|
|
|
+{$ifdef win32}
|
|
td := GetTypeData(aType);
|
|
td := GetTypeData(aType);
|
|
Result := not (td^.ArrayData.Size in [1, 2, 4]);
|
|
Result := not (td^.ArrayData.Size in [1, 2, 4]);
|
|
|
|
+{$else}
|
|
|
|
+ Result := True;
|
|
|
|
+{$endif}
|
|
end;
|
|
end;
|
|
tkRecord: begin
|
|
tkRecord: begin
|
|
|
|
+{$ifdef win32}
|
|
td := GetTypeData(aType);
|
|
td := GetTypeData(aType);
|
|
Result := not (td^.RecSize in [1, 2, 4]);
|
|
Result := not (td^.RecSize in [1, 2, 4]);
|
|
|
|
+{$else}
|
|
|
|
+ Result := True;
|
|
|
|
+{$endif}
|
|
end;
|
|
end;
|
|
tkSet: begin
|
|
tkSet: begin
|
|
td := GetTypeData(aType);
|
|
td := GetTypeData(aType);
|