* fix enum rtti info alignment for proper alignment required archs

git-svn-id: trunk@10471 -
This commit is contained in:
micha 2008-03-09 21:53:46 +00:00
parent b475719a03
commit 461c8fb09f

View File

@ -724,7 +724,7 @@ type Ptypeinfo=^Ttypeinfo;
var var
p:Pstring; p:Pstring;
l,h,m:cardinal; l,h,m,offset:cardinal;
sorted_array:^Tsorted_array; sorted_array:^Tsorted_array;
s:string; s:string;
@ -740,7 +740,11 @@ begin
if Pcardinal(ord2strindex)^=0 then if Pcardinal(ord2strindex)^=0 then
begin begin
{The compiler did generate a lookup table.} {The compiler did generate a lookup table.}
with Penuminfo(Pbyte(typinfo)+2+length(Ptypeinfo(typinfo)^.name))^ do offset:=2+length(Ptypeinfo(typinfo)^.name);
{$ifdef FPC_REQUIRES_PROPER_ALIGNMENT}
offset:=(offset+sizeof(sizeint)-1) and not (sizeof(sizeint)-1);
{$endif}
with Penuminfo(Pbyte(typinfo)+offset)^ do
begin begin
if (ordinal<minvalue) or (ordinal>maxvalue) then if (ordinal<minvalue) or (ordinal>maxvalue) then
begin begin