garray: Just use one bit to hold the null teminated state

This is probably ignored for saving space because of padding optimizations,
but since we want this value to be either 0 or 1, this enforces this too.
This commit is contained in:
Marco Trevisan (Treviño) 2022-12-07 13:39:15 +01:00
parent 670c1f4173
commit 9ea56848c2

View File

@ -1072,7 +1072,7 @@ struct _GRealPtrArray
guint len;
guint alloc;
gatomicrefcount ref_count;
guint8 null_terminated; /* always either 0 or 1, so it can be added to array lengths */
guint8 null_terminated : 1; /* always either 0 or 1, so it can be added to array lengths */
GDestroyNotify element_free_func;
};