From 056feef60b79e867190697f2d26e3ac7edf903a5 Mon Sep 17 00:00:00 2001 From: Ryan Lortie Date: Sat, 13 Mar 2010 19:55:56 -0500 Subject: [PATCH] GVariantIter: expand the size of the dummy struct Will allow for some nice tricks in the future. --- glib/gvariant.c | 4 ++-- glib/gvariant.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/glib/gvariant.c b/glib/gvariant.c index d484ee2b5..1cacb6396 100644 --- a/glib/gvariant.c +++ b/glib/gvariant.c @@ -1993,7 +1993,7 @@ gsize g_variant_iter_init (GVariantIter *iter, GVariant *value) { - g_assert (sizeof (GVariantIter) == sizeof (struct stack_iter)); + g_assert (sizeof (struct stack_iter) <= sizeof (GVariantIter)); GVSI(iter)->magic = GVSI_MAGIC; GVSI(iter)->value = value; @@ -2371,7 +2371,7 @@ g_variant_builder_init (GVariantBuilder *builder, g_return_if_fail (type != NULL); g_return_if_fail (g_variant_type_is_container (type)); - g_assert (sizeof (struct stack_builder) < sizeof (GVariantBuilder)); + g_assert (sizeof (struct stack_builder) <= sizeof (GVariantBuilder)); memset (builder, 0, sizeof (GVariantBuilder)); GVSB(builder)->type = g_variant_type_copy (type); diff --git a/glib/gvariant.h b/glib/gvariant.h index a073b2b2c..abf81020a 100644 --- a/glib/gvariant.h +++ b/glib/gvariant.h @@ -142,7 +142,7 @@ gboolean g_variant_equal (gconstp typedef struct _GVariantIter GVariantIter; struct _GVariantIter { /*< private >*/ - gsize x[8]; + gsize x[16]; }; GVariantIter * g_variant_iter_new (GVariant *value);