1
0
mirror of https://gitlab.gnome.org/GNOME/glib.git synced 2026-10-24 00:49:00 +03:00

gvariant: Tweak GVariantIter heap allocation size

This re-works commit 608b846f38, because
it didn’t actually fix the warning on msys2-clang64.

Rather than go through contortions to try and squash that warning, just
allocate the full size struct instead. If people are worried about the
allocation size here, they really should already be using a stack
allocated GVariantIter instead.

Fixes CI failure https://gitlab.gnome.org/GNOME/glib/-/jobs/6444549.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
This commit is contained in:
Philip Withnall
2026-04-21 14:20:19 +01:00
parent 99716ef7d4
commit ebbeb3180d

View File

@@ -2989,7 +2989,7 @@ g_variant_iter_new (GVariant *value)
{
GVariantIter *iter;
iter = (GVariantIter *) (void *) g_slice_new (struct heap_iter);
iter = g_slice_new (GVariantIter);
GVHI(iter)->value_ref = g_variant_ref (value);
GVHI(iter)->magic = GVHI_MAGIC;