dotgnu-pnet-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dotgnu-pnet-commits] CVS: pnet/cscc/c c_types.c,1.29,1.30


From: Rhys Weatherley <address@hidden>
Subject: [Dotgnu-pnet-commits] CVS: pnet/cscc/c c_types.c,1.29,1.30
Date: Tue, 15 Apr 2003 21:46:06 -0400

Update of /cvsroot/dotgnu-pnet/pnet/cscc/c
In directory subversions:/tmp/cvs-serv15411/cscc/c

Modified Files:
        c_types.c 
Log Message:


CTypeDefineField: convert struct fields with types like "type[]"
into "type[0]" (Bug #2774).


Index: c_types.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/cscc/c/c_types.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -r1.29 -r1.30
*** c_types.c   12 Mar 2003 07:42:32 -0000      1.29
--- c_types.c   16 Apr 2003 01:46:04 -0000      1.30
***************
*** 735,738 ****
--- 735,745 ----
        ILField *field;
  
+       /* Convert open arrays into zero-length arrays, so that
+          "type[]" can be used in a struct to mean "type[0]" */
+       if(CTypeIsOpenArray(fieldType))
+       {
+               fieldType = CTypeCreateArray(info, CTypeGetElemType(fieldType), 
0);
+       }
+ 
        /* Determine the size and alignment of the new field */
        size = CTypeSizeAndAlign(fieldType, &align);





reply via email to

[Prev in Thread] Current Thread [Next in Thread]