mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 16:29:24 +02:00
* fix DynArrayDim() and DynArrayIndex() after the RTTI changes in r33944
git-svn-id: trunk@34180 -
This commit is contained in:
parent
022df814c2
commit
d9d2789375
@ -355,7 +355,11 @@ function DynArrayDim(typeInfo: Pointer): Integer;
|
|||||||
typeInfo:=aligntoptr(typeInfo+2+PByte(typeInfo)[1]);
|
typeInfo:=aligntoptr(typeInfo+2+PByte(typeInfo)[1]);
|
||||||
|
|
||||||
{ element type info}
|
{ element type info}
|
||||||
|
{$ifdef VER3_0}
|
||||||
typeInfo:=pdynarraytypedata(typeInfo)^.elType2;
|
typeInfo:=pdynarraytypedata(typeInfo)^.elType2;
|
||||||
|
{$else VER3_0}
|
||||||
|
typeInfo:=pdynarraytypedata(typeInfo)^.elType2^;
|
||||||
|
{$endif VER3_0}
|
||||||
|
|
||||||
Inc(result);
|
Inc(result);
|
||||||
end;
|
end;
|
||||||
@ -410,7 +414,11 @@ function DynArrayIndex(a: Pointer; const indices: array of SizeInt; typeInfo: Po
|
|||||||
{ skip kind and name }
|
{ skip kind and name }
|
||||||
typeInfo:=(typeInfo+2+PByte(typeInfo)[1]);
|
typeInfo:=(typeInfo+2+PByte(typeInfo)[1]);
|
||||||
{ element type info}
|
{ element type info}
|
||||||
|
{$ifdef VER3_0}
|
||||||
typeInfo:=pdynarraytypedata(typeInfo)^.elType2;
|
typeInfo:=pdynarraytypedata(typeInfo)^.elType2;
|
||||||
|
{$else VER3_0}
|
||||||
|
typeInfo:=pdynarraytypedata(typeInfo)^.elType2^;
|
||||||
|
{$endif VER3_0}
|
||||||
|
|
||||||
if typeInfo=nil then
|
if typeInfo=nil then
|
||||||
exit(nil);
|
exit(nil);
|
||||||
|
Loading…
Reference in New Issue
Block a user