mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-05-31 13:02:43 +02:00
+ 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:
parent
2002650a23
commit
dad9260f93
@ -615,6 +615,19 @@ uses
|
|||||||
{$endif}
|
{$endif}
|
||||||
fgl;
|
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
|
type
|
||||||
|
|
||||||
{ TRttiPool }
|
{ TRttiPool }
|
||||||
|
Loading…
Reference in New Issue
Block a user