mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 16:09:23 +02:00
* export DynArrayAssign, resolves #39897
This commit is contained in:
parent
ad7cc0e69d
commit
9f293df425
@ -803,6 +803,9 @@ function DynArraySize(a : pointer): tdynarrayindex;
|
|||||||
procedure DynArrayClear(var a: Pointer; typeInfo: Pointer);
|
procedure DynArrayClear(var a: Pointer; typeInfo: Pointer);
|
||||||
external name 'FPC_DYNARRAY_CLEAR';
|
external name 'FPC_DYNARRAY_CLEAR';
|
||||||
|
|
||||||
|
procedure DynArrayAssign(var dest: Pointer; src: Pointer; typeInfo: pointer);
|
||||||
|
external name 'FPC_DYNARRAY_ASSIGN';
|
||||||
|
|
||||||
function DynArrayDim(typeInfo: Pointer): Integer;
|
function DynArrayDim(typeInfo: Pointer): Integer;
|
||||||
begin
|
begin
|
||||||
result:=0;
|
result:=0;
|
||||||
|
@ -39,6 +39,8 @@ function DynArraySize(a : pointer): tdynarrayindex;
|
|||||||
procedure DynArrayClear(var a: Pointer; typeInfo: Pointer);
|
procedure DynArrayClear(var a: Pointer; typeInfo: Pointer);
|
||||||
function DynArrayDim(typeInfo: Pointer): Integer;
|
function DynArrayDim(typeInfo: Pointer): Integer;
|
||||||
function DynArrayBounds(a: Pointer; typeInfo: Pointer): TBoundArray;
|
function DynArrayBounds(a: Pointer; typeInfo: Pointer): TBoundArray;
|
||||||
|
procedure DynArrayAssign(var dest: Pointer; src: Pointer; typeInfo: pointer);
|
||||||
|
|
||||||
|
|
||||||
function IsDynArrayRectangular(a: Pointer; typeInfo: Pointer): Boolean;
|
function IsDynArrayRectangular(a: Pointer; typeInfo: Pointer): Boolean;
|
||||||
function DynArrayIndex(a: Pointer; const indices: array of SizeInt; typeInfo: Pointer): Pointer;
|
function DynArrayIndex(a: Pointer; const indices: array of SizeInt; typeInfo: Pointer): Pointer;
|
||||||
|
11
tests/webtbs/tw39897.pp
Normal file
11
tests/webtbs/tw39897.pp
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
var
|
||||||
|
a,b : array of longint;
|
||||||
|
|
||||||
|
begin
|
||||||
|
b:=nil;
|
||||||
|
SetLength(a,5);
|
||||||
|
a[1]:=1234;
|
||||||
|
DynArrayAssign(pointer(b),pointer(a),TypeInfo(a));
|
||||||
|
if (length(b)<>5) or (b[1]<>1234) then
|
||||||
|
halt(1);
|
||||||
|
end.
|
Loading…
Reference in New Issue
Block a user