glib/gobject
Philip Withnall 1f9bcba295 gobject: Annotate pre-C99 flexible arrays with their dynamic length
These arrays were declared using the pre-C99 gcc extension which treated
any trailing array in a struct as potentially flexible in length.

Change them to be C99 flexible arrays, annotate them with
`G_COUNTED_BY`, and adjust the size calculations of the overall structs
to match. The size of the overall struct will have decreased as `sizeof
(struct->my_flexible_array)` is `sizeof (*struct->my_flexible_array)` if
`my_flexible_array[1]` is used in the definition, whereas it’s zero if
C99 `my_flexible_array[]` syntax is used.

See https://people.kernel.org/kees/bounded-flexible-arrays-in-c#replace-1-element-arrays

I found the declarations using:
```sh
git grep '\[1\];' | grep -v '='
```

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2024-02-29 13:54:05 +00:00
..
2023-10-16 23:34:04 +01:00
2023-12-31 09:09:48 +00:00
2022-10-13 20:53:56 -04:00
2023-10-16 23:35:05 +01:00
2023-12-31 09:09:48 +00:00
2022-10-13 20:53:56 -04:00
2023-10-16 23:34:24 +01:00
2023-12-19 18:41:02 +00:00
2023-12-19 18:41:02 +00:00
2022-10-13 20:53:56 -04:00
2022-10-13 20:53:56 -04:00
2023-10-23 11:26:53 +01:00
2022-10-13 20:53:56 -04:00
2023-10-23 11:26:53 +01:00