r7029: Make array support in pidl similar to that in other IDL compilers. We should
authorJelmer Vernooij <jelmer@samba.org>
Fri, 27 May 2005 15:49:15 +0000 (15:49 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:17:07 +0000 (13:17 -0500)
now able to use constructions like these:

[size_is(20)] int *x; -> Pointer to array of 20 ints
[size_is(20)] int x[]; -> Array of 20 ints
[size_is(20)] int *x[]; -> Array of 20 pointers to ints
[size_is(20,)] int *x[] -> Array of 20 pointers to ints
[size_is(,20)] int *x[]; -> Pointer to array of 20 ints
[size_is(,20)] int **x; -> Pointer to pointer to array of 20 ints
[size_is(20)] int x[][30]; -> 20 blocks of 30 ints

15 files changed:
source/build/pidl/ndr.pm
source/librpc/idl/dcom.idl
source/librpc/idl/dfs.idl
source/librpc/idl/drsuapi.idl
source/librpc/idl/echo.idl
source/librpc/idl/eventlog.idl
source/librpc/idl/lsa.idl
source/librpc/idl/netlogon.idl
source/librpc/idl/remact.idl
source/librpc/idl/samr.idl
source/librpc/idl/spoolss.idl
source/librpc/idl/srvsvc.idl
source/librpc/idl/winreg.idl
source/librpc/idl/wkssvc.idl
source/librpc/idl/xattr.idl

index a350a834eb9a989738a4f3cc7e2ab85171d0b18d..72bf686aa03df0904bdb09253ef25964562d86a2 100644 (file)
@@ -25,10 +25,66 @@ sub GetElementLevelTable($)
 
        my $order = [];
        my $is_deferred = 0;
+       my @bracket_array = ();
+       my @length_is = ();
+       my @size_is = ();
+
+       if (util::has_property($e, "size_is")) {
+               @size_is = split /,/, util::has_property($e, "size_is");
+       }
+
+       if (util::has_property($e, "length_is")) {
+               @length_is = split /,/, util::has_property($e, "length_is");
+       }
+
+       if (defined($e->{ARRAY_LEN})) {
+               @bracket_array = @{$e->{ARRAY_LEN}};
+       }
        
-       # FIXME: Process {ARRAY_LEN} kinds of arrays
+       # Parse the [][][][] style array stuff
+       foreach my $d (@bracket_array) {
+               my $size = $d;
+               my $length = $d;
+               my $is_surrounding = 0;
+               my $is_varying = 0;
+               my $is_conformant = 0;
+
+               if ($d eq "*") {
+                       $is_conformant = 1;
+                       unless ($size = shift @size_is) {
+                               print "$e->{FILE}:$e->{LINE}: Must specify size_is() for conformant array!\n";
+                               exit 1;
+                       }
+
+                       if ($length = shift @length_is) {
+                               $is_varying = 1;
+                       } else {
+                               $length = $size;
+                       }
+
+                       if ($e == $e->{PARENT}->{ELEMENTS}[-1] 
+                               and $e->{PARENT}->{TYPE} ne "FUNCTION") {
+                               $is_surrounding = 1;
+                       }
+               }
+
+               push (@$order, {
+                       TYPE => "ARRAY",
+                       SIZE_IS => $size,
+                       LENGTH_IS => $length,
+                       IS_DEFERRED => "$is_deferred",
+                       # Inline arrays (which are a pidl extension) are never encoded
+                       # as surrounding the struct they're part of
+                       IS_SURROUNDING => "$is_surrounding",
+                       IS_VARYING => "$is_varying",
+                       IS_CONFORMANT => "$is_conformant",
+                       IS_FIXED => (not $is_conformant and util::is_constant($size)),
+                       NO_METADATA => (not $is_conformant),
+                       IS_INLINE => (not $is_conformant and not util::is_constant($size))
+               });
+       }
 
-       # First, all the pointers
+       # Next, all the pointers
        foreach my $i (1..$e->{POINTERS}) {
                my $pt = pointer_type($e);
 
@@ -45,44 +101,35 @@ sub GetElementLevelTable($)
                        IS_DEFERRED => "$is_deferred",
                        LEVEL => $level
                });
+               
                # everything that follows will be deferred
                $is_deferred = 1 if ($e->{PARENT}->{TYPE} ne "FUNCTION");
-               # FIXME: Process array here possibly (in case of multi-dimensional arrays, etc)
-       }
-
-       if ((defined($e->{ARRAY_LEN}) and scalar(@{$e->{ARRAY_LEN}})) or 
-                util::has_property($e, "size_is")) {
-               my @length;
-               my @size;
 
-               if (util::has_property($e, "size_is")) {
-                       @size = split /,/, util::has_property($e, "size_is");
-               } elsif (defined($e->{ARRAY_LEN})) { 
-                       @size = @{$e->{ARRAY_LEN}};
-               }
+               my $array_size;
+               my $array_length;
+               if ($array_size = shift @size_is) {
+                       my $is_varying = 0;
+                       if ($array_length = shift @length_is) {
+                               $is_varying = 1;
+                       } else {
+                               $array_length = $array_size;
+                       }
 
-               if (util::has_property($e, "length_is")) {
-                       @length = split /,/, util::has_property($e, "length_is");
-               } else {
-                       @length = @size;
+                       push (@$order, {
+                               TYPE => "ARRAY",
+                               SIZE_IS => $array_size,
+                               LENGTH_IS => $array_length,
+                               IS_DEFERRED => "$is_deferred",
+                               IS_SURROUNDING => 0,
+                               IS_VARYING => "$is_varying",
+                               IS_CONFORMANT => 1,
+                               IS_FIXED => 0,
+                               NO_METADATA => 0,
+                               IS_INLINE => 0,
+                       });
+
+                       $is_deferred = 0;
                }
-
-               push (@$order, {
-                       TYPE => "ARRAY",
-                       SIZE_IS => $size[0],
-                       LENGTH_IS => $length[0],
-                       IS_DEFERRED => "$is_deferred",
-                       # Inline arrays (which are a pidl extension) are never encoded
-                       # as surrounding the struct they're part of
-                       IS_SURROUNDING => (is_surrounding_array($e) and not is_inline_array($e)),
-                       IS_VARYING => is_varying_array($e),
-                       IS_CONFORMANT => is_conformant_array($e),
-                       IS_FIXED => is_fixed_array($e),
-                       NO_METADATA => (is_inline_array($e) or is_fixed_array($e)),
-                       IS_INLINE => is_inline_array($e)
-               });
-
-               $is_deferred = 0;
        }
 
        if (my $hdr_size = util::has_property($e, "subcontext")) {
@@ -170,55 +217,6 @@ sub pointer_type($)
        return undef;
 }
 
-# return 1 if this is a fixed array
-sub is_fixed_array($)
-{
-       my $e = shift;
-       my $len = $e->{"ARRAY_LEN"}[0];
-       return 1 if (defined $len && util::is_constant($len));
-       return 0;
-}
-
-# return 1 if this is a conformant array
-sub is_conformant_array($)
-{
-       my $e = shift;
-       return 1 if (util::has_property($e, "size_is"));
-       return 0;
-}
-
-# return 1 if this is a inline array
-sub is_inline_array($)
-{
-       my $e = shift;
-       my $len = $e->{ARRAY_LEN}[0];
-       if (defined $len && $len ne "*" && !is_fixed_array($e)) {
-               return 1;
-       }
-       return 0;
-}
-
-# return 1 if this is a varying array
-sub is_varying_array($)
-{
-       my $e = shift;
-       return util::has_property($e, "length_is");
-}
-
-# return 1 if this is a surrounding array (sometimes 
-# referred to as an embedded array). Can only occur as 
-# the last element in a struct and can not contain any pointers.
-sub is_surrounding_array($)
-{
-       my $e = shift;
-
-       return ($e->{POINTERS} == 0 
-               and defined $e->{ARRAY_LEN}[0] 
-               and     $e->{ARRAY_LEN}[0] eq "*"
-               and $e == $e->{PARENT}->{ELEMENTS}[-1] 
-               and $e->{PARENT}->{TYPE} ne "FUNCTION");
-}
-
 sub is_surrounding_string($)
 {
        my $e = shift;
@@ -230,6 +228,7 @@ sub is_surrounding_string($)
                and $e->{PARENT}->{TYPE} ne "FUNCTION";
 }
 
+
 #####################################################################
 # work out the correct alignment for a structure or union
 sub find_largest_alignment($)
index f8db720817b8490bdb84cb4004ed65313a8cdbc7..2a670070298b31d070b352af985335aba122b3d1 100644 (file)
@@ -92,8 +92,8 @@ interface IRemUnknown : IUnknown
                [in] GUID *ripid, /* interface to QI on */
                [in] uint32 cRefs, /* count of AddRefs requested */
                [in] uint16 cIids, /* count of IIDs that follow */
-               [in, size_is(cIids)] GUID *iids[], /* IIDs to QI for */
-               [out, size_is(cIids)] MInterfacePointer *ip[]
+               [in, size_is(cIids)] GUID *iids, /* IIDs to QI for */
+               [out, size_is(cIids)] MInterfacePointer *ip
                );
 
        typedef struct 
@@ -106,7 +106,7 @@ interface IRemUnknown : IUnknown
        [call_as(AddRef)] WERROR RemAddRef (
                 [in] uint16 cInterfaceRefs,
                 [in, size_is(cInterfaceRefs)] REMINTERFACEREF InterfaceRefs[],
-                [out, size_is(cInterfaceRefs)] WERROR *pResults[]
+                [out, size_is(cInterfaceRefs)] WERROR *pResults
                );
 
        [call_as(Release)] WERROR RemRelease (
@@ -191,9 +191,9 @@ interface IRemUnknown2 : IRemUnknown
        [call_as(QueryInterface2)] WERROR RemQueryInterface2 (
                 [in] GUID *ripid,
                 [in] uint16 cIids,
-                [in, size_is(cIids)] GUID *iids[],
-                [out, size_is(cIids)] WERROR *phr[],
-                [out, size_is(cIids)] MInterfacePointer *ppMIF[]
+                [in, size_is(cIids)] GUID *iids,
+                [out, size_is(cIids)] WERROR *phr,
+                [out, size_is(cIids)] MInterfacePointer *ppMIF
                );
 }
 
@@ -236,7 +236,7 @@ interface IRemUnknown2 : IRemUnknown
                        /*FIXME[in,size_is(cNames)] OLESTR *rgszNames[], */
                        [in] uint16 cNames,
                        [in] uint32 lcid,
-                       [out,size_is(cNames)] uint32 *rgDispId[]);
+                       [out,size_is(cNames)] uint32 *rgDispId);
 
        typedef struct {
                uint16 vartype;
@@ -311,7 +311,7 @@ interface IStream : IUnknown
                                );
 
        WERROR Write(
-                               [in,size_is(num_requested)] uint8 *data[],
+                               [in,size_is(num_requested)] uint8 *data,
                                 [in] uint32 num_requested,
                                 [out] uint32 num_written);
 }
index 8bbb3e02ff12a1702215b37fb24f7218b6ab0bc8..085bed4f4e96eeb8f1745c707a353ca48a3c279d 100644 (file)
@@ -65,7 +65,7 @@
                unistr *comment;
                uint32 state;
                uint32 num_stores;
-               [size_is(num_stores)] dfs_StorageInfo *stores[];
+               [size_is(num_stores)] dfs_StorageInfo *stores;
        } dfs_Info3;
 
        typedef struct {
@@ -75,7 +75,7 @@
                uint32 timeout;
                GUID   guid;
                uint32 num_stores;
-               [size_is(num_stores)] dfs_StorageInfo *stores[];
+               [size_is(num_stores)] dfs_StorageInfo *stores;
        } dfs_Info4;
 
        typedef struct {
 
        typedef struct {
                uint32 count;
-               [size_is(count)] dfs_Info1 *s[];
+               [size_is(count)] dfs_Info1 *s;
        } dfs_EnumArray1;
 
        typedef struct {
                uint32 count;
-               [size_is(count)] dfs_Info2 *s[];
+               [size_is(count)] dfs_Info2 *s;
        } dfs_EnumArray2;
 
        typedef struct {
                uint32 count;
-               [size_is(count)] dfs_Info3 *s[];
+               [size_is(count)] dfs_Info3 *s;
        } dfs_EnumArray3;
 
        typedef struct {
                uint32 count;
-               [size_is(count)] dfs_Info4 *s[];
+               [size_is(count)] dfs_Info4 *s;
        } dfs_EnumArray4;
 
        typedef struct {
                uint32 count;
-               [size_is(count)] dfs_Info200 *s[];
+               [size_is(count)] dfs_Info200 *s;
        } dfs_EnumArray200;
 
        typedef struct {
                uint32 count;
-               [size_is(count)] dfs_Info300 *s[];
+               [size_is(count)] dfs_Info300 *s;
        } dfs_EnumArray300;
 
 
index 737cd3b131f5711424acce20031c16fe672f68a0..66ed85db7a7c4232cd56ecd9dd87764eed7fa7f0 100644 (file)
@@ -235,7 +235,7 @@ interface drsuapi
 
        typedef [flag(NDR_PAHEX)] struct {
                [range(0,10000)] uint32 length;
-               [size_is(length)] uint8 *byte_array[];
+               [size_is(length)] uint8 *byte_array;
        } drsuapi_DsGetNCChangesRequest_Ctr14;
 
        typedef struct {
@@ -245,7 +245,7 @@ interface drsuapi
 
        typedef struct {
                [range(0,0x100000)] uint32 count;
-               [size_is(count)] drsuapi_DsGetNCChangesRequest_Ctr13 *array[];
+               [size_is(count)] drsuapi_DsGetNCChangesRequest_Ctr13 *array;
        } drsuapi_DsGetNCChangesRequest_Ctr12;
 
        typedef struct {
@@ -386,7 +386,7 @@ interface drsuapi
 
        typedef struct {
                [range(0,10485760)] uint32 num_values;
-               [size_is(num_values)] drsuapi_DsAttributeValueDataBlob *values[];
+               [size_is(num_values)] drsuapi_DsAttributeValueDataBlob *values;
        } drsuapi_DsAttributeValueCtrDataBlob;
 
        /* objectClass values */
@@ -397,7 +397,7 @@ interface drsuapi
 
        typedef struct {
                [range(0,10485760)] uint32 num_values;
-               [size_is(num_values)] drsuapi_DsAttributeValueObjectClassId *values[];
+               [size_is(num_values)] drsuapi_DsAttributeValueObjectClassId *values;
        } drsuapi_DsAttributeValueCtrObjectClassId;
 
        /* uint32 values */
@@ -408,7 +408,7 @@ interface drsuapi
 
        typedef struct {
                [range(0,10485760)] uint32 num_values;
-               [size_is(num_values)] drsuapi_DsAttributeValueUINT32 *values[];
+               [size_is(num_values)] drsuapi_DsAttributeValueUINT32 *values;
        } drsuapi_DsAttributeValueCtrUINT32;
 
        /* UnicodeString values */
@@ -419,7 +419,7 @@ interface drsuapi
 
        typedef struct {
                [range(0,10485760)] uint32 num_values;
-               [size_is(num_values)] drsuapi_DsAttributeValueUnicodeString *values[];
+               [size_is(num_values)] drsuapi_DsAttributeValueUnicodeString *values;
        } drsuapi_DsAttributeValueCtrUnicodeString;
 
        /* DN String values */
@@ -438,7 +438,7 @@ interface drsuapi
 
        typedef struct {
                [range(0,10485760)] uint32 num_values;
-               [size_is(num_values)] drsuapi_DsAttributeValueDNString *values[];
+               [size_is(num_values)] drsuapi_DsAttributeValueDNString *values;
        } drsuapi_DsAttributeValueCtrDNString;
 
        /* GUID values */
@@ -449,7 +449,7 @@ interface drsuapi
 
        typedef struct {
                [range(0,10485760)] uint32 num_values;
-               [size_is(num_values)] drsuapi_DsAttributeValueGUID *values[];
+               [size_is(num_values)] drsuapi_DsAttributeValueGUID *values;
        } drsuapi_DsAttributeValueCtrGUID;
 
        /* SID values */
@@ -460,7 +460,7 @@ interface drsuapi
 
        typedef struct {
                [range(0,10485760)] uint32 num_values;
-               [size_is(num_values)] drsuapi_DsAttributeValueSID *values[];
+               [size_is(num_values)] drsuapi_DsAttributeValueSID *values;
        } drsuapi_DsAttributeValueCtrSID;
 
        /* SecurityDescriptor values */
@@ -471,7 +471,7 @@ interface drsuapi
 
        typedef struct {
                [range(0,10485760)] uint32 num_values;
-               [size_is(num_values)] drsuapi_DsAttributeValueSecurityDescriptor *values[];
+               [size_is(num_values)] drsuapi_DsAttributeValueSecurityDescriptor *values;
        } drsuapi_DsAttributeValueCtrSecurityDescriptor;
 
        /* NTTIME_1sec values */
@@ -482,7 +482,7 @@ interface drsuapi
 
        typedef struct {
                [range(0,10485760)] uint32 num_values;
-               [size_is(num_values)] drsuapi_DsAttributeValueNTTIME_1sec *values[];
+               [size_is(num_values)] drsuapi_DsAttributeValueNTTIME_1sec *values;
        } drsuapi_DsAttributeValueCtrNTTIME_1sec;
 
        typedef [nodiscriminant] union {
@@ -534,7 +534,7 @@ interface drsuapi
 
        typedef struct {
                [range(0,1048576)] uint32 num_attributes;
-               [size_is(num_attributes)]  drsuapi_DsReplicaAttribute *attributes[];
+               [size_is(num_attributes)]  drsuapi_DsReplicaAttribute *attributes;
        } drsuapi_DsReplicaAttributeCtr;
 
        typedef [public] struct {
@@ -753,7 +753,7 @@ interface drsuapi
                drsuapi_DsNameFormat format_offered;
                drsuapi_DsNameFormat format_desired;
                [range(1,10000)] uint32 count;
-               [size_is(count)] drsuapi_DsNameString *names[];
+               [size_is(count)] drsuapi_DsNameString *names;
        } drsuapi_DsNameRequest1;
 
        typedef [switch_type(int32)] union {
@@ -768,7 +768,7 @@ interface drsuapi
 
        typedef struct {
                uint32 count;
-               [size_is(count)] drsuapi_DsNameInfo1 *array[];
+               [size_is(count)] drsuapi_DsNameInfo1 *array;
        } drsuapi_DsNameCtr1;
 
        typedef [switch_type(int32)] union {
@@ -795,7 +795,7 @@ interface drsuapi
                uint32 unknown1;
                unistr *object_dn;
                [range(0,10000)] uint32 count;
-               [size_is(count)] drsuapi_DsNameString *spn_names[];
+               [size_is(count)] drsuapi_DsNameString *spn_names;
        } drsuapi_DsWriteAccountSpnRequest1;
 
        typedef [switch_type(int32)] union {
@@ -848,7 +848,7 @@ interface drsuapi
 
        typedef struct {
                [range(0,10000)] uint32 count;
-               [size_is(count)] drsuapi_DsGetDCInfo1 *array[];
+               [size_is(count)] drsuapi_DsGetDCInfo1 *array;
        } drsuapi_DsGetDCInfoCtr1;
 
        typedef struct {
@@ -870,7 +870,7 @@ interface drsuapi
 
        typedef struct {
                [range(0,10000)] uint32 count;
-               [size_is(count)] drsuapi_DsGetDCInfo2 *array[];
+               [size_is(count)] drsuapi_DsGetDCInfo2 *array;
        } drsuapi_DsGetDCInfoCtr2;
 
        typedef struct {
@@ -885,7 +885,7 @@ interface drsuapi
 
        typedef struct {
                [range(0,10000)] uint32 count;
-               [size_is(count)] drsuapi_DsGetDCInfo01 *array[];
+               [size_is(count)] drsuapi_DsGetDCInfo01 *array;
        } drsuapi_DsGetDCInfoCtr01;
 
        typedef [v1_enum] enum {
@@ -942,7 +942,7 @@ interface drsuapi
                uint32 level;
                [switch_is(level)] drsuapi_DsAddEntryCtr3Info *info;
                [range(0,10000)] uint32 count;
-               [size_is(count)] drsuapi_DsReplicaObjectIdentifier2 *objects[];
+               [size_is(count)] drsuapi_DsReplicaObjectIdentifier2 *objects;
        } drsuapi_DsAddEntryCtr3;
 
        typedef [switch_type(int32)] union {
@@ -1106,7 +1106,7 @@ interface drsuapi
                unistr *attribute_name;
                unistr *object_dn;
                uint32 value_length;
-               [size_is(value_length)] uint8 *value[];
+               [size_is(value_length)] uint8 *value;
                NTTIME deleted;
                NTTIME created;
                uint32 version;
@@ -1161,7 +1161,7 @@ interface drsuapi
                unistr *attribute_name;
                unistr *object_dn;
                uint32 value_length;
-               [size_is(value_length)] uint8 *value[];
+               [size_is(value_length)] uint8 *value;
                NTTIME deleted;
                NTTIME created;
                uint32 version;
index deb7c95bac53722d1b9e5b488ef74ef254d40161..b0defe59dde8341ccdd151c44084fba5ad418111 100644 (file)
@@ -24,12 +24,12 @@ interface rpcecho
        /* Sink data to the server */
        void echo_SinkData(
                [in] uint32 len,
-               [in,ref,size_is(len)] uint8 *data[]
+               [in,ref,size_is(len)] uint8 *data
        );
        /* Source data from server */
        void echo_SourceData(
                [in] uint32 len,
-               [out,ref,size_is(len)] uint8 *data[]
+               [out,ref,size_is(len)] uint8 *data
        );
 
 
index 8b4963c1e1f427be3cd776fb6d1bc7399e5a377a..c255256972286c81dc7f70dd5ef80371009f85f6 100644 (file)
@@ -37,9 +37,9 @@
                uint32 stringoffset;
                [size_is(num_of_strings)] eventlog_String bla[*];
                uint32 sid_length;
-               [length_is(sid_length)] dom_sid *sids[];
+               [size_is(sid_length)] dom_sid *sids;
                uint32 data_length;
-               [length_is(data_length)] uint8 *data[];
+               [size_is(data_length)] uint8 *data;
                unistr *source_name;
                unistr *machine_name;
        } eventlog_Record;
                                                                   [in]                 uint32 flags,
                                                                   [in]                 uint32 offset,
                                                                   [in,out]             uint32 number_of_bytes,
-                                                                  [out,ref,size_is(number_of_bytes)]           uint8 *data[],
+                                                                  [out,ref,size_is(number_of_bytes)]           uint8 *data,
                                                                   [out]                uint32 sent_size,
                                                                   [out]                uint32 real_size
                                                                  );
index 3737d4c0eac12f0d354676f69f01c3065a0c7569..0831b9ef12c861e7ff1190751f47c55c1e54bb4b 100644 (file)
@@ -48,7 +48,7 @@
 
        typedef struct {
                uint32 count;
-               [size_is(count)] lsa_PrivEntry *privs[];
+               [size_is(count)] lsa_PrivEntry *privs;
        } lsa_PrivArray;
 
        NTSTATUS lsa_EnumPrivs (
 
        typedef struct {
                uint32 auditing_mode;
-               [size_is(count)] uint32 *settings[];
+               [size_is(count)] uint32 *settings;
                uint32 count;
        } lsa_AuditEventsInfo;
 
        
        typedef [public] struct {
                [range(0,1000)] uint32 num_sids;
-               [size_is(num_sids)] lsa_SidPtr *sids[];
+               [size_is(num_sids)] lsa_SidPtr *sids;
        } lsa_SidArray;
 
        NTSTATUS lsa_EnumAccounts (
 
        typedef struct {
                uint32 count;
-               [size_is(count)] lsa_DomainInformation *domains[];
+               [size_is(count)] lsa_DomainInformation *domains;
        } lsa_DomainList;
 
        NTSTATUS lsa_EnumTrustDom (
 
        typedef struct {
                [range(0,1000)] uint32 count;
-               [size_is(count)] lsa_TranslatedSid *sids[];
+               [size_is(count)] lsa_TranslatedSid *sids;
        } lsa_TransSidArray;
 
        typedef struct {
                [range(0,1000)] uint32 count;
-               [size_is(count)] lsa_TrustInformation *domains[];
+               [size_is(count)] lsa_TrustInformation *domains;
                uint32 max_count;
        } lsa_RefDomainList;
 
 
        typedef struct {
                [range(0,1000)] uint32 count;
-               [size_is(count)] lsa_TranslatedName *names[];
+               [size_is(count)] lsa_TranslatedName *names;
        } lsa_TransNameArray;
 
        NTSTATUS lsa_LookupSids (
        typedef [flag(NDR_PAHEX)] struct {
                uint32 length;
                uint32 size;
-               [size_is(size),length_is(length)] uint8 *data[];
+               [size_is(size),length_is(length)] uint8 *data;
        } lsa_DATA_BUF;
 
        typedef [flag(NDR_PAHEX)] struct {
                [range(0,65536)] uint32 size;
-               [size_is(size)] uint8 *data[];
+               [size_is(size)] uint8 *data;
        } lsa_DATA_BUF2;
 
        typedef enum {
        
        typedef struct {
                uint32 count;
-               [size_is(count)] lsa_String *names[];
+               [size_is(count)] lsa_String *names;
        } lsa_RightSet;
        
        NTSTATUS lsa_EnumAccountRights (
 
        typedef struct {
                [range(0,1000)] uint32 count;
-               [size_is(count)] lsa_TranslatedName2 *names[];
+               [size_is(count)] lsa_TranslatedName2 *names;
        } lsa_TransNameArray2;
 
        NTSTATUS lsa_LookupSids2(
 
        typedef struct {
                [range(0,1000)] uint32 count;
-               [size_is(count)] lsa_TranslatedSid2 *sids[];
+               [size_is(count)] lsa_TranslatedSid2 *sids;
        } lsa_TransSidArray2;
 
        NTSTATUS lsa_LookupNames2 (
 
        typedef struct {
                [range(0,1000)] uint32 count;
-               [size_is(count)] lsa_TranslatedSid3 *sids[];
+               [size_is(count)] lsa_TranslatedSid3 *sids;
        } lsa_TransSidArray3;
 
        NTSTATUS lsa_LookupNames3 (
index 9d9d2dd98f62e45cc62a38a6eaa40948ee8c9e8a..35666381d4bd2ca9b9b9b40d9548c028baad8111 100644 (file)
@@ -88,7 +88,7 @@ interface netlogon
        typedef struct {
                uint16 size;
                uint16 length;
-               [size_is(size/2),length_is(length/2)] uint16 *bindata[];
+               [size_is(size/2),length_is(length/2)] uint16 *bindata;
        } netr_AcctLockStr;
 
        typedef struct {
@@ -109,7 +109,7 @@ interface netlogon
        typedef [flag(NDR_PAHEX)] struct {
                uint16 length;
                [value(r->length)] uint16 size;
-               [size_is(size),length_is(length)] uint8 *data[];
+               [size_is(size),length_is(length)] uint8 *data;
        } netr_ChallengeResponse;
 
        typedef [flag(NDR_PAHEX)] struct {
@@ -180,13 +180,13 @@ interface netlogon
        typedef [public] struct {
                netr_SamBaseInfo base;
                uint32 sidcount;
-               [size_is(sidcount)] netr_SidAttr *sids[];
+               [size_is(sidcount)] netr_SidAttr *sids;
        } netr_SamInfo3;
 
        typedef struct {
                netr_SamBaseInfo base;
                uint32 sidcount;
-               [size_is(sidcount)] netr_SidAttr *sids[];
+               [size_is(sidcount)] netr_SidAttr *sids;
                netr_String forest;
                netr_String principle;
                uint32 unknown4[20];
@@ -194,12 +194,12 @@ interface netlogon
 
        typedef struct {
                uint32 pac_size;
-               [size_is(pac_size)] uint8 *pac[];
+               [size_is(pac_size)] uint8 *pac;
                netr_String logon_domain;
                netr_String logon_server;
                netr_String principal_name;
                uint32 auth_size;
-               [size_is(auth_size)] uint8 *auth[];
+               [size_is(auth_size)] uint8 *auth;
                netr_UserSessionKey user_session_key;
                uint32 expansionroom[10];
                netr_String unknown1;
@@ -350,7 +350,7 @@ interface netlogon
                uint32 DataLength;
 
                /* netr_USER_KEYS encrypted with the session key */
-               [size_is(DataLength)][flag(NDR_PAHEX)] uint8 *SensitiveData[];
+               [size_is(DataLength)][flag(NDR_PAHEX)] uint8 *SensitiveData;
        } netr_USER_PRIVATE_INFO;
 
        typedef struct {
@@ -447,8 +447,8 @@ interface netlogon
        } netr_DELTA_RENAME;
 
        typedef struct {
-               [size_is(num_rids)] uint32 *rids[];
-               [size_is(num_rids)] uint32 *attribs[];
+               [size_is(num_rids)] uint32 *rids;
+               [size_is(num_rids)] uint32 *attribs;
                uint32 num_rids;
                uint32 unknown1;
                uint32 unknown2;
@@ -493,7 +493,7 @@ interface netlogon
                NTTIME auditretentionperiod;
                bool8 auditingmode;
                uint32 maxauditeventcount;
-               [size_is(maxauditeventcount+1)] uint32 *eventauditoptions[];
+               [size_is(maxauditeventcount+1)] uint32 *eventauditoptions;
                netr_String primary_domain_name;
                dom_sid2 *sid;
                netr_QUOTA_LIMITS quota_limits;
@@ -514,7 +514,7 @@ interface netlogon
        typedef struct {
                netr_String domain_name;
                uint32 num_controllers;
-               [size_is(num_controllers)] netr_String *controller_names[];
+               [size_is(num_controllers)] netr_String *controller_names;
                uint32 SecurityInformation;
                sec_desc_buf sdbuf;
                netr_String unknown1;
@@ -534,8 +534,8 @@ interface netlogon
        typedef struct {
                uint32 privilege_entries;
                uint32 privilege_control;
-               [size_is(privilege_entries)] uint32 *privilege_attrib[];
-               [size_is(privilege_entries)] netr_String *privilege_name[];
+               [size_is(privilege_entries)] uint32 *privilege_attrib;
+               [size_is(privilege_entries)] netr_String *privilege_name;
                netr_QUOTA_LIMITS quotalimits;
                uint32 system_flags;
                uint32 SecurityInformation;
@@ -561,7 +561,7 @@ interface netlogon
        typedef struct {
                uint32 len;
                uint32 maxlen;
-               [size_is(maxlen)][length_is(len)] uint8 *cipher_data[];
+               [size_is(maxlen)][length_is(len)] uint8 *cipher_data;
        } netr_CIPHER_VALUE;
 
        typedef struct {
@@ -664,7 +664,7 @@ interface netlogon
 
        typedef struct {
                uint32 num_deltas;
-               [size_is(num_deltas)] netr_DELTA_ENUM *delta_enum[];
+               [size_is(num_deltas)] netr_DELTA_ENUM *delta_enum;
        } netr_DELTA_ENUM_ARRAY;
 
 
@@ -876,7 +876,7 @@ interface netlogon
                [in]     unistr computername,
                [in]     netr_Authenticator credential,
                [in,out] netr_Authenticator return_authenticator,
-               [in][size_is(change_log_entry_size)] uint8 *change_log_entry[],
+               [in][size_is(change_log_entry_size)] uint8 *change_log_entry,
                [in]     uint32 change_log_entry_size,
                [out]    netr_DELTA_ENUM_ARRAY *delta_enum_array
                );
@@ -946,13 +946,13 @@ interface netlogon
 
        typedef struct {
                uint32 length;
-               [size_is(length)] uint8 *data[];
+               [size_is(length)] uint8 *data;
        } netr_Blob;
 
        typedef [flag(NDR_PAHEX)] struct {
                uint16 length;
                uint16 size;
-               [size_is(size/2),length_is(length/2)] uint16 *data[];
+               [size_is(size/2),length_is(length/2)] uint16 *data;
        } netr_BinaryString;
 
        typedef struct {
@@ -988,7 +988,7 @@ interface netlogon
        typedef struct {
                netr_DomainTrustInfo domaininfo;
                uint32 num_trusts;
-               [size_is(num_trusts)] netr_DomainTrustInfo *trusts[];
+               [size_is(num_trusts)] netr_DomainTrustInfo *trusts;
                uint32 unknown[14]; /* room for expansion? */
        } netr_DomainInfo1;
 
@@ -1134,7 +1134,7 @@ interface netlogon
                [in]                 unistr           *server_name,
                [in]                 netr_TrustFlags  trust_flags,
                [out]                uint32           count,
-               [out,size_is(count)] netr_DomainTrust *trusts[]
+               [out,size_is(count)] netr_DomainTrust *trusts
                );
 
 
index 232ae9fffcbfd2d55e79713b3dd94ddec6d89e7a..6f64a5c02c543e67bed0bac667cc993ebeec75e3 100644 (file)
@@ -37,7 +37,7 @@ interface IRemoteActivation
                        [in] uint32 ClientImpLevel,
                        [in] uint32 Mode,
                        [in,range(1,32768)] uint32 Interfaces,
-                       [in,size_is(Interfaces)] GUID *pIIDs[],
+                       [in,size_is(Interfaces)] GUID *pIIDs,
                        [in] uint16 num_protseqs,
                        [in, size_is(num_protseqs)] uint16 protseq[*],
                        [out] hyper pOxid,
index 59de0d1b4a34312e559542284cfb1b9bc08cb3b0..ba862071098b70eacc8d05ffe879ac7eed15f077 100644 (file)
 
        typedef struct {
                uint32 count;
-               [size_is(count)] samr_SamEntry *entries[];
+               [size_is(count)] samr_SamEntry *entries;
        } samr_SamArray;
 
        NTSTATUS samr_EnumDomains (
 
        typedef struct {
                [range(0,1024)]  uint32 count;
-               [size_is(count)] uint32 *ids[];
+               [size_is(count)] uint32 *ids;
        } samr_Ids;
 
        NTSTATUS samr_GetAliasMembership(
        /* Function    0x19     */
        typedef struct {
                uint32 count;
-               [size_is(count)] uint32 *rids[];
-               [size_is(count)] uint32 *types[];
+               [size_is(count)] uint32 *rids;
+               [size_is(count)] uint32 *types;
        } samr_RidTypeArray;
 
        NTSTATUS samr_QueryGroupMember(
        /* this is also used in samr and netlogon */
        typedef [public, flag(NDR_PAHEX)] struct {
                uint16 units_per_week;
-               [size_is(1260), length_is(units_per_week/8)] uint8 *bits[];
+               [size_is(1260), length_is(units_per_week/8)] uint8 *bits;
        } samr_LogonHours;
 
        typedef struct {
                samr_String unknown2;
                samr_String unknown3;
                uint32 buf_count;
-               [size_is(buf_count)] uint8 *buffer[];
+               [size_is(buf_count)] uint8 *buffer;
                uint32 rid;
                uint32 primary_gid;
                samr_AcctFlags acct_flags;
 
        typedef [public] struct {
                uint32     count;
-               [size_is(count)] samr_RidWithType *rids[];
+               [size_is(count)] samr_RidWithType *rids;
        } samr_RidWithTypeArray;
 
        NTSTATUS samr_GetGroupsForUser(
 
        typedef struct {
                uint32 count;
-               [size_is(count)] samr_DispEntryGeneral *entries[];
+               [size_is(count)] samr_DispEntryGeneral *entries;
        } samr_DispInfoGeneral;
 
        typedef struct {
 
        typedef struct {
                uint32 count;
-               [size_is(count)] samr_DispEntryFull *entries[];
+               [size_is(count)] samr_DispEntryFull *entries;
        } samr_DispInfoFull;
 
        typedef struct {
 
        typedef struct {
                uint32 count;
-               [size_is(count)] samr_DispEntryAscii *entries[];
+               [size_is(count)] samr_DispEntryAscii *entries;
        } samr_DispInfoAscii;
 
        typedef [switch_type(uint16)] union {
index 0693d3c3c48556f1166a770ffd72531272174c37..e496b2b5c6146777065773cda000aefc7dcf9ddf 100644 (file)
                uint32 u3;
                uint32 u4;
                uint32 count;
-               [size_is(count)] uint16 *array[];
+               [size_is(count)] uint16 *array;
        } spoolss_RemoteFindFirstPrinterChangeNotifyEx_t2;
 
        typedef struct {
                uint32 u1;
                uint32 u2;
                uint32 count;
-               [size_is(count)] spoolss_RemoteFindFirstPrinterChangeNotifyEx_t2 *t2[];
+               [size_is(count)] spoolss_RemoteFindFirstPrinterChangeNotifyEx_t2 *t2;
        } spoolss_RemoteFindFirstPrinterChangeNotifyEx_t1;
 
        WERROR spoolss_RemoteFindFirstPrinterChangeNotifyEx(
index 3661bfb9cc2faab8635141457ba3ac77b2ed2602..0a9d910c1f128f4c8c76273738dafa2774813c35 100644 (file)
@@ -24,7 +24,7 @@
 
        typedef struct {
                uint32 count;
-               [size_is(count)] srvsvc_NetCharDevInfo0 *array[];
+               [size_is(count)] srvsvc_NetCharDevInfo0 *array;
        } srvsvc_NetCharDevCtr0;
 
        typedef struct {
@@ -36,7 +36,7 @@
 
        typedef struct {
                uint32 count;
-               [size_is(count)] srvsvc_NetCharDevInfo1 *array[];
+               [size_is(count)] srvsvc_NetCharDevInfo1 *array;
        } srvsvc_NetCharDevCtr1;
 
        typedef union {
@@ -88,7 +88,7 @@
 
        typedef struct {
                uint32 count;
-               [size_is(count)] srvsvc_NetCharDevQInfo0 *array[];
+               [size_is(count)] srvsvc_NetCharDevQInfo0 *array;
        } srvsvc_NetCharDevQCtr0;
 
        typedef struct {
 
        typedef struct {
                uint32 count;
-               [size_is(count)] srvsvc_NetCharDevQInfo1 *array[];
+               [size_is(count)] srvsvc_NetCharDevQInfo1 *array;
        } srvsvc_NetCharDevQCtr1;
 
        typedef union {
 
        typedef struct {
                uint32 count;
-               [size_is(count)] srvsvc_NetConnInfo0 *array[];
+               [size_is(count)] srvsvc_NetConnInfo0 *array;
        } srvsvc_NetConnCtr0;
 
        typedef struct {
 
        typedef struct {
                uint32 count;
-               [size_is(count)] srvsvc_NetConnInfo1 *array[];
+               [size_is(count)] srvsvc_NetConnInfo1 *array;
        } srvsvc_NetConnCtr1;
 
        typedef union {
 
        typedef struct {
                uint32 count;
-               [size_is(count)] srvsvc_NetFileInfo2 *array[];
+               [size_is(count)] srvsvc_NetFileInfo2 *array;
        } srvsvc_NetFileCtr2;
 
        typedef struct {
 
        typedef struct {
                uint32 count;
-               [size_is(count)] srvsvc_NetFileInfo3 *array[];
+               [size_is(count)] srvsvc_NetFileInfo3 *array;
        } srvsvc_NetFileCtr3;
 
        typedef union {
 
        typedef struct {
                uint32 count;
-               [size_is(count)] srvsvc_NetSessInfo0 *array[];
+               [size_is(count)] srvsvc_NetSessInfo0 *array;
        } srvsvc_NetSessCtr0;
 
        typedef struct {
 
        typedef struct {
                uint32 count;
-               [size_is(count)] srvsvc_NetSessInfo1 *array[];
+               [size_is(count)] srvsvc_NetSessInfo1 *array;
        } srvsvc_NetSessCtr1;
 
        typedef struct {
 
        typedef struct {
                uint32 count;
-               [size_is(count)] srvsvc_NetSessInfo2 *array[];
+               [size_is(count)] srvsvc_NetSessInfo2 *array;
        } srvsvc_NetSessCtr2;
 
        typedef struct {
 
        typedef struct {
                uint32 count;
-               [size_is(count)] srvsvc_NetSessInfo10 *array[];
+               [size_is(count)] srvsvc_NetSessInfo10 *array;
        } srvsvc_NetSessCtr10;
 
        typedef struct {
 
        typedef struct {
                uint32 count;
-               [size_is(count)] srvsvc_NetSessInfo502 *array[];
+               [size_is(count)] srvsvc_NetSessInfo502 *array;
        } srvsvc_NetSessCtr502;
 
        typedef union {
 
        typedef struct {
                uint32 count;
-               [size_is(count)] srvsvc_NetShareInfo0 *array[];
+               [size_is(count)] srvsvc_NetShareInfo0 *array;
        } srvsvc_NetShareCtr0;
 
        typedef struct {
 
        typedef struct {
                uint32 count;
-               [size_is(count)] srvsvc_NetShareInfo1 *array[];
+               [size_is(count)] srvsvc_NetShareInfo1 *array;
        } srvsvc_NetShareCtr1;
 
        typedef struct {
 
        typedef struct {
                uint32 count;
-               [size_is(count)] srvsvc_NetShareInfo2 *array[];
+               [size_is(count)] srvsvc_NetShareInfo2 *array;
        } srvsvc_NetShareCtr2;
 
        typedef struct {
 
        typedef struct {
                uint32 count;
-               [size_is(count)] srvsvc_NetShareInfo501 *array[];
+               [size_is(count)] srvsvc_NetShareInfo501 *array;
        } srvsvc_NetShareCtr501;
 
        typedef struct {
 
        typedef struct {
                uint32 count;
-               [size_is(count)] srvsvc_NetShareInfo502 *array[];
+               [size_is(count)] srvsvc_NetShareInfo502 *array;
        } srvsvc_NetShareCtr502;
 
        typedef struct {
 
        typedef struct {
                uint32 count;
-               [size_is(count)] srvsvc_NetTransportInfo0 *array[];
+               [size_is(count)] srvsvc_NetTransportInfo0 *array;
        } srvsvc_NetTransportCtr0;
 
        typedef struct {
 
        typedef struct {
                uint32 count;
-               [size_is(count)] srvsvc_NetTransportInfo1 *array[];
+               [size_is(count)] srvsvc_NetTransportInfo1 *array;
        } srvsvc_NetTransportCtr1;
 
        typedef struct {
 
        typedef struct {
                uint32 count;
-               [size_is(count)] srvsvc_NetTransportInfo2 *array[];
+               [size_is(count)] srvsvc_NetTransportInfo2 *array;
        } srvsvc_NetTransportCtr2;
 
        typedef struct {
 
        typedef struct {
                uint32 count;
-               [size_is(count)] srvsvc_NetTransportInfo3 *array[];
+               [size_is(count)] srvsvc_NetTransportInfo3 *array;
        } srvsvc_NetTransportCtr3;
 
        typedef union {
index 31f293267a14967ba960b57d2ff2c6ef2561ca58..277cf548623a226ded3617f6d7bfc7a80241c890 100644 (file)
        typedef struct {
                uint16 length;
                uint16 size;
-               [size_is(size/2),length_is(length/2)] uint16 *name[];
+               [size_is(size/2),length_is(length/2)] uint16 *name;
        } winreg_EnumValueString;
 
        WERROR winreg_EnumValue(
                [in]     winreg_EnumValueString name_in,
                [out]    winreg_String name_out,
                [in,out] uint32 *type,
-               [in,out,size_is(*size),length_is(*length)] uint8 *value[],
+               [in,out,size_is(*size),length_is(*length)] uint8 *value,
                [in,out] uint32 *size,
                [in,out] uint32 *length
        );
        );
 
        typedef struct {
-               [size_is(size),length_is(len)] uint8 *data[];
+               [size_is(size),length_is(len)] uint8 *data;
                uint32 size;
                uint32 len;
        } KeySecurityData;
                [in,ref] policy_handle *handle,
                [in] winreg_String value_name,
                [in,out] uint32 *type,
-               [in,out,size_is(*size),length_is(*length)] uint8 *data[],
+               [in,out,size_is(*size),length_is(*length)] uint8 *data,
                [in,out] uint32 *size,
                [in,out] uint32 *length
        );
                [in,ref]           policy_handle *handle,
                [in]               winreg_String name,
                [in]               uint32 type,
-               [in,size_is(size)] uint8  *data[],
+               [in,size_is(size)] uint8  *data,
                [in]               uint32 size
        );
 
        /* Function: 0x1d */
        WERROR winreg_QueryMultipleValues(
                [in,ref] policy_handle *key_handle, 
-               [in,out,ref,size_is(num_values),length_is(num_values)] QueryMultipleValue *values[],
+               [in,out,ref,size_is(num_values),length_is(num_values)] QueryMultipleValue *values,
         [in] uint32 num_values,
-        [in,out,size_is(*buffer_size),length_is(*buffer_size)] uint8 *buffer[],
+        [in,out,size_is(*buffer_size),length_is(*buffer_size)] uint8 *buffer,
         [in,out,ref] uint32 *buffer_size
        );
 
index a948f53dbf2809e4cd9f00153d6353ba1f9c11a8..76ccd0fe48c49406808f71e8f93144a2c239aaab 100644 (file)
 
        typedef struct {
                uint32 count;
-               [size_is(count)] wkssvc_NetWkstaTransportInfo0 *array[];
+               [size_is(count)] wkssvc_NetWkstaTransportInfo0 *array;
        } wkssvc_NetWkstaTransportCtr0;
 
        typedef union {
index 4aa92ca5b2d00d40e1f8a5b945ccd6dae0e2577a..ae2a084c210eca36cf366a240b81bda5c12ccc20 100644 (file)
@@ -65,7 +65,7 @@ interface xattr
 
        typedef [public] struct {
                uint16 num_eas;
-               [size_is(num_eas)] xattr_EA *eas[];
+               [size_is(num_eas)] xattr_EA *eas;
        } xattr_DosEAs;
 
        /* we store stream information in this xattr structure. Then
@@ -90,7 +90,7 @@ interface xattr
 
        typedef [public] struct {
                uint32 num_streams;
-               [size_is(num_streams)] xattr_DosStream *streams[];
+               [size_is(num_streams)] xattr_DosStream *streams;
        } xattr_DosStreams;