2
0
Эх сурвалжийг харах

* fixed passing of dyn. arrays to open array parameters

florian 22 жил өмнө
parent
commit
6a06df943b
2 өөрчлөгдсөн 16 нэмэгдсэн , 2 устгасан
  1. 11 1
      compiler/ncal.pas
  2. 5 1
      compiler/ncnv.pas

+ 11 - 1
compiler/ncal.pas

@@ -378,6 +378,13 @@ type
                  (def_from.size=def_to.size) then
                 eq:=te_convert_l1;
             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 :
             begin
               { an implicit pointer conversion is allowed }
@@ -2584,7 +2591,10 @@ begin
 end.
 {
   $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
       calculation
 

+ 5 - 1
compiler/ncnv.pas

@@ -947,6 +947,7 @@ implementation
         { a dynamic array is a pointer to an array, so to convert it to }
         { an open array, we have to dereference it (JM)                 }
         result := ctypeconvnode.create_explicit(left,voidpointertype);
+        resulttypepass(result);
         { left is reused }
         left := nil;
         result := cderefnode.create(result);
@@ -2119,7 +2120,10 @@ begin
 end.
 {
   $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
 
   Revision 1.126  2003/10/23 14:44:07  peter