* fixed fpc_dynarry_copy for arm/sparc

This commit is contained in:
florian 2004-11-06 15:29:19 +00:00
parent e2ec30866a
commit b54ea2800a

View File

@ -318,15 +318,14 @@ procedure fpc_dynarray_copy(var pdest : pointer;psrc : pointer;ti : pointer;
exit; exit;
realpsrc:=pdynarray(psrc-sizeof(tdynarray)); realpsrc:=pdynarray(psrc-sizeof(tdynarray));
{ skip kind and name } { skip kind and name }
inc(pointer(ti),ord(pdynarraytypeinfo(ti)^.namelen)); inc(pointer(ti),ord(pdynarraytypeinfo(ti)^.namelen)+2);
{$ifdef FPC_REQUIRES_PROPER_ALIGNMENT} {$ifdef FPC_ALIGNSRTTI}
move(pdynarraytypeinfo(ti)^.elesize,elesize,sizeof(elesize)); ti:=aligntoptr(ti);
move(pdynarraytypeinfo(ti)^.eletype,eletype,sizeof(eletype)); {$endif FPC_ALIGNSRTTI}
{$else FPC_REQUIRES_PROPER_ALIGNMENT}
elesize:=pdynarraytypeinfo(ti)^.elesize; elesize:=psizeint(ti)^;
eletype:=pdynarraytypeinfo(ti)^.eletype; eletype:=pdynarraytypeinfo(ti+sizeof(sizeint));
{$endif FPC_REQUIRES_PROPER_ALIGNMENT}
{ -1, -1 (highidx=lowidx-1-1=-3) is used to copy the whole array like a:=copy(b);, so { -1, -1 (highidx=lowidx-1-1=-3) is used to copy the whole array like a:=copy(b);, so
update the lowidx and highidx with the values from psrc } update the lowidx and highidx with the values from psrc }
@ -356,7 +355,10 @@ procedure fpc_dynarray_copy(var pdest : pointer;psrc : pointer;ti : pointer;
{ {
$Log$ $Log$
Revision 1.31 2004-11-03 10:54:36 florian Revision 1.32 2004-11-06 15:29:19 florian
* fixed fpc_dynarry_copy for arm/sparc
Revision 1.31 2004/11/03 10:54:36 florian
* fixed dyn. array handling for 32 bit architectures requiering proper alignment * fixed dyn. array handling for 32 bit architectures requiering proper alignment
Revision 1.30 2004/10/24 20:01:41 peter Revision 1.30 2004/10/24 20:01:41 peter