|
@@ -354,6 +354,29 @@ resourcestring
|
|
|
|
|
|
implementation
|
|
|
|
|
|
+function aligntoptr(p : pointer) : pointer;inline;
|
|
|
+ begin
|
|
|
+{$ifdef FPC_REQUIRES_PROPER_ALIGNMENT}
|
|
|
+ result:=align(p,sizeof(p));
|
|
|
+{$else FPC_REQUIRES_PROPER_ALIGNMENT}
|
|
|
+ result:=p;
|
|
|
+{$endif FPC_REQUIRES_PROPER_ALIGNMENT}
|
|
|
+ end;
|
|
|
+
|
|
|
+function aligntoqword(p : pointer) : pointer;inline;
|
|
|
+ type
|
|
|
+ TAlignCheck = record
|
|
|
+ b : byte;
|
|
|
+ q : qword;
|
|
|
+ end;
|
|
|
+ begin
|
|
|
+{$ifdef FPC_REQUIRES_PROPER_ALIGNMENT}
|
|
|
+ result:=align(p,PtrInt(@TAlignCheck(nil^).q))
|
|
|
+{$else FPC_REQUIRES_PROPER_ALIGNMENT}
|
|
|
+ result:=p;
|
|
|
+{$endif FPC_REQUIRES_PROPER_ALIGNMENT}
|
|
|
+ end;
|
|
|
+
|
|
|
type
|
|
|
|
|
|
{ TRttiPool }
|
|
@@ -1856,30 +1879,6 @@ begin
|
|
|
FTypeData:=GetTypeData(ATypeInfo);
|
|
|
end;
|
|
|
|
|
|
-function aligntoptr(p : pointer) : pointer;inline;
|
|
|
- begin
|
|
|
-{$ifdef FPC_REQUIRES_PROPER_ALIGNMENT}
|
|
|
- result:=align(p,sizeof(p));
|
|
|
-{$else FPC_REQUIRES_PROPER_ALIGNMENT}
|
|
|
- result:=p;
|
|
|
-{$endif FPC_REQUIRES_PROPER_ALIGNMENT}
|
|
|
- end;
|
|
|
-
|
|
|
-function aligntoqword(p : pointer) : pointer;inline;
|
|
|
- type
|
|
|
- TAlignCheck = record
|
|
|
- b : byte;
|
|
|
- q : qword;
|
|
|
- end;
|
|
|
- begin
|
|
|
-{$ifdef FPC_REQUIRES_PROPER_ALIGNMENT}
|
|
|
- result:=align(p,PtrInt(@TAlignCheck(nil^).q))
|
|
|
-{$else FPC_REQUIRES_PROPER_ALIGNMENT}
|
|
|
- result:=p;
|
|
|
-{$endif FPC_REQUIRES_PROPER_ALIGNMENT}
|
|
|
- end;
|
|
|
-
|
|
|
-
|
|
|
function TRttiType.GetProperties: specialize TArray<TRttiProperty>;
|
|
|
type
|
|
|
PPropData = ^TPropData;
|