mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-23 10:42:11 +01:00
girepository: Annotate C99 flexible arrays with their dynamic lengths
Using the new `G_COUNTED_BY` macro (i.e. the `__counted_by__` attribute). I found the declarations using: ```sh git grep '\[\];' | grep -v '=' ``` Signed-off-by: Philip Withnall <pwithnall@gnome.org>
This commit is contained in:
parent
9d23578318
commit
e2340f111b
@ -78,7 +78,7 @@
|
|||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
size_t n_interfaces;
|
size_t n_interfaces;
|
||||||
GIBaseInfo *interfaces[];
|
GIBaseInfo *interfaces[] G_COUNTED_BY(n_interfaces);
|
||||||
} GTypeInterfaceCache;
|
} GTypeInterfaceCache;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -549,7 +549,7 @@ typedef struct {
|
|||||||
|
|
||||||
uint16_t n_arguments;
|
uint16_t n_arguments;
|
||||||
|
|
||||||
ArgBlob arguments[];
|
ArgBlob arguments[] G_COUNTED_BY(n_arguments);
|
||||||
} SignatureBlob;
|
} SignatureBlob;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -743,7 +743,7 @@ typedef struct {
|
|||||||
uint8_t reserved2;
|
uint8_t reserved2;
|
||||||
uint16_t n_types;
|
uint16_t n_types;
|
||||||
|
|
||||||
SimpleTypeBlob type[];
|
SimpleTypeBlob type[] G_COUNTED_BY(n_types);
|
||||||
} ParamTypeBlob;
|
} ParamTypeBlob;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -767,7 +767,7 @@ typedef struct {
|
|||||||
uint8_t reserved2;
|
uint8_t reserved2;
|
||||||
|
|
||||||
uint16_t n_domains; /* Must be 0 */
|
uint16_t n_domains; /* Must be 0 */
|
||||||
uint16_t domains[];
|
uint16_t domains[] G_COUNTED_BY(n_domains);
|
||||||
} ErrorTypeBlob;
|
} ErrorTypeBlob;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -989,7 +989,7 @@ typedef struct {
|
|||||||
|
|
||||||
uint32_t error_domain;
|
uint32_t error_domain;
|
||||||
|
|
||||||
ValueBlob values[];
|
ValueBlob values[] G_COUNTED_BY(n_values);
|
||||||
} EnumBlob;
|
} EnumBlob;
|
||||||
|
|
||||||
#define ACCESSOR_SENTINEL 0x3ff
|
#define ACCESSOR_SENTINEL 0x3ff
|
||||||
@ -1209,7 +1209,7 @@ typedef struct {
|
|||||||
uint32_t reserved3;
|
uint32_t reserved3;
|
||||||
uint32_t reserved4;
|
uint32_t reserved4;
|
||||||
|
|
||||||
uint16_t interfaces[];
|
uint16_t interfaces[] G_COUNTED_BY(n_interfaces);
|
||||||
} ObjectBlob;
|
} ObjectBlob;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1261,7 +1261,7 @@ typedef struct {
|
|||||||
uint32_t reserved2;
|
uint32_t reserved2;
|
||||||
uint32_t reserved3;
|
uint32_t reserved3;
|
||||||
|
|
||||||
uint16_t prerequisites[];
|
uint16_t prerequisites[] G_COUNTED_BY(n_prerequisites);
|
||||||
} InterfaceBlob;
|
} InterfaceBlob;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user