mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 22:14:25 +02:00
* fixed passing of dyn. arrays to open array parameters
This commit is contained in:
parent
75e5a6e867
commit
6a06df943b
@ -378,6 +378,13 @@ type
|
|||||||
(def_from.size=def_to.size) then
|
(def_from.size=def_to.size) then
|
||||||
eq:=te_convert_l1;
|
eq:=te_convert_l1;
|
||||||
end;
|
end;
|
||||||
|
arraydef :
|
||||||
|
begin
|
||||||
|
if is_open_array(def_to) and
|
||||||
|
is_dynamic_array(def_from) and
|
||||||
|
equal_defs(tarraydef(def_from).elementtype.def,tarraydef(def_to).elementtype.def) then
|
||||||
|
eq:=te_convert_l2;
|
||||||
|
end;
|
||||||
pointerdef :
|
pointerdef :
|
||||||
begin
|
begin
|
||||||
{ an implicit pointer conversion is allowed }
|
{ an implicit pointer conversion is allowed }
|
||||||
@ -2584,7 +2591,10 @@ begin
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.200 2003-10-23 14:44:07 peter
|
Revision 1.201 2003-10-29 22:01:20 florian
|
||||||
|
* fixed passing of dyn. arrays to open array parameters
|
||||||
|
|
||||||
|
Revision 1.200 2003/10/23 14:44:07 peter
|
||||||
* splitted buildderef and buildderefimpl to fix interface crc
|
* splitted buildderef and buildderefimpl to fix interface crc
|
||||||
calculation
|
calculation
|
||||||
|
|
||||||
|
@ -947,6 +947,7 @@ implementation
|
|||||||
{ a dynamic array is a pointer to an array, so to convert it to }
|
{ a dynamic array is a pointer to an array, so to convert it to }
|
||||||
{ an open array, we have to dereference it (JM) }
|
{ an open array, we have to dereference it (JM) }
|
||||||
result := ctypeconvnode.create_explicit(left,voidpointertype);
|
result := ctypeconvnode.create_explicit(left,voidpointertype);
|
||||||
|
resulttypepass(result);
|
||||||
{ left is reused }
|
{ left is reused }
|
||||||
left := nil;
|
left := nil;
|
||||||
result := cderefnode.create(result);
|
result := cderefnode.create(result);
|
||||||
@ -2119,7 +2120,10 @@ begin
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.127 2003-10-28 15:36:01 peter
|
Revision 1.128 2003-10-29 22:01:20 florian
|
||||||
|
* fixed passing of dyn. arrays to open array parameters
|
||||||
|
|
||||||
|
Revision 1.127 2003/10/28 15:36:01 peter
|
||||||
* absolute to object field supported, fixes tb0458
|
* absolute to object field supported, fixes tb0458
|
||||||
|
|
||||||
Revision 1.126 2003/10/23 14:44:07 peter
|
Revision 1.126 2003/10/23 14:44:07 peter
|
||||||
|
Loading…
Reference in New Issue
Block a user