|
@@ -21,6 +21,7 @@ unit typinfo;
|
|
interface
|
|
interface
|
|
|
|
|
|
{$MODE objfpc}
|
|
{$MODE objfpc}
|
|
|
|
+{$inline on}
|
|
{$h+}
|
|
{$h+}
|
|
|
|
|
|
uses SysUtils;
|
|
uses SysUtils;
|
|
@@ -310,13 +311,13 @@ type
|
|
Auxiliary methods
|
|
Auxiliary methods
|
|
---------------------------------------------------------------------}
|
|
---------------------------------------------------------------------}
|
|
|
|
|
|
-function aligntoptr(p : pointer) : pointer;
|
|
|
|
|
|
+function aligntoptr(p : pointer) : pointer;inline;
|
|
begin
|
|
begin
|
|
{$ifdef FPC_REQUIRES_PROPER_ALIGNMENT}
|
|
{$ifdef FPC_REQUIRES_PROPER_ALIGNMENT}
|
|
- if (ptruint(p) and (sizeof(ptruint)-1))<>0 then
|
|
|
|
- ptruint(p) := (ptruint(p) + sizeof(ptruint) - 1) and not (sizeof(ptruint) - 1);
|
|
|
|
|
|
+ result:=align(p,sizeof(p));
|
|
|
|
+{$else FPC_REQUIRES_PROPER_ALIGNMENT}
|
|
|
|
+ result:=p;
|
|
{$endif FPC_REQUIRES_PROPER_ALIGNMENT}
|
|
{$endif FPC_REQUIRES_PROPER_ALIGNMENT}
|
|
- aligntoptr:=p;
|
|
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
|