+ introduce AlignToPtr, a copy of the one from the TypInfo unit (we should really come up with a better name here considering that it's redirecting to AlignTypeData on m68k...)

git-svn-id: trunk@42803 -
This commit is contained in:
svenbarth 2019-08-24 23:08:20 +00:00
parent 2002650a23
commit dad9260f93

View File

@ -615,6 +615,19 @@ uses
{$endif}
fgl;
function AlignToPtr(aPtr: Pointer): Pointer; inline;
begin
{$ifdef CPUM68K}
Result := AlignTypeData(aPtr);
{$else}
{$ifdef FPC_REQUIRES_PROPER_ALIGNMENT}
Result := Align(aPtr, SizeOf(Pointer));
{$else}
Result := aPtr;
{$endif}
{$endif}
end;
type
{ TRttiPool }