From 78a00b657b04bd9c9e61307bb399f6f91ba6e391 Mon Sep 17 00:00:00 2001 From: florian Date: Sat, 25 Oct 2003 22:52:07 +0000 Subject: [PATCH] * fixed copy(, ...) --- rtl/inc/compproc.inc | 7 +++++-- rtl/inc/dynarr.inc | 13 +++++++++---- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/rtl/inc/compproc.inc b/rtl/inc/compproc.inc index f46fb595a1..9b4df09130 100644 --- a/rtl/inc/compproc.inc +++ b/rtl/inc/compproc.inc @@ -57,7 +57,7 @@ Function fpc_shortstr_Copy(const s:shortstring;index:StrLenInt;count:StrLenInt) Function fpc_ansistr_Copy (Const S : AnsiString; Index,Size : Longint) : AnsiString;compilerproc; Function fpc_widestr_Copy (Const S : WideString; Index,Size : Longint) : WideString;compilerproc; function fpc_char_copy(c:char;index : StrLenInt;count : StrLenInt): shortstring;compilerproc; -procedure fpc_dynarray_copy(var pdest : pointer;psrc : pointer;ti : pointer;lowidx,highidx:longint);compilerproc; +procedure fpc_dynarray_copy(var pdest : pointer;psrc : pointer;ti : pointer;lowidx,count:tdynarrayindex);compilerproc; function fpc_dynarray_length(p : pointer) : tdynarrayindex; compilerproc; function fpc_dynarray_high(p : pointer) : tdynarrayindex; compilerproc; @@ -309,7 +309,10 @@ function fpc_qword_to_double(q: qword): double; compilerproc; { $Log$ - Revision 1.49 2003-10-04 23:40:42 florian + Revision 1.50 2003-10-25 22:52:07 florian + * fixed copy(, ...) + + Revision 1.49 2003/10/04 23:40:42 florian * write helper comproc for variants fixed Revision 1.48 2003/09/02 13:04:08 florian diff --git a/rtl/inc/dynarr.inc b/rtl/inc/dynarr.inc index 63b6a23492..18c1432c43 100644 --- a/rtl/inc/dynarr.inc +++ b/rtl/inc/dynarr.inc @@ -256,16 +256,18 @@ procedure fpc_dynarray_setlength(var p : pointer;pti : pointer; { provide local access to dynarr_copy } procedure int_dynarray_copy(var pdest : pointer;psrc : pointer;ti : pointer; - lowidx,highidx:longint);[external name 'FPC_DYNARR_COPY']; + lowidx,count:tdynarrayindex);[external name 'FPC_DYNARR_COPY']; procedure fpc_dynarray_copy(var pdest : pointer;psrc : pointer;ti : pointer; - lowidx,highidx:longint);[Public,Alias:'FPC_DYNARR_COPY'];{$ifdef hascompilerproc} compilerproc; {$endif} + lowidx,count:tdynarrayindex);[Public,Alias:'FPC_DYNARR_COPY'];{$ifdef hascompilerproc} compilerproc; {$endif} var realpdest, realpsrc : pdynarray; cnt, i,size : longint; + highidx : tdynarrayindex; begin + highidx:=lowidx+count-1; pdest:=nil; if psrc=nil then exit; @@ -300,7 +302,10 @@ procedure fpc_dynarray_copy(var pdest : pointer;psrc : pointer;ti : pointer; { $Log$ - Revision 1.21 2002-11-26 23:02:07 peter + Revision 1.22 2003-10-25 22:52:07 florian + * fixed copy(, ...) + + Revision 1.21 2002/11/26 23:02:07 peter * fixed dynarray copy Revision 1.20 2002/10/09 20:24:30 florian @@ -324,4 +329,4 @@ procedure fpc_dynarray_copy(var pdest : pointer;psrc : pointer;ti : pointer; Revision 1.15 2002/01/21 20:16:08 peter * updated for dynarr:=nil -} \ No newline at end of file +}