[glib] GVariantIter: expand the size of the dummy struct



commit 056feef60b79e867190697f2d26e3ac7edf903a5
Author: Ryan Lortie <desrt desrt ca>
Date:   Sat Mar 13 19:55:56 2010 -0500

    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 d484ee2..1cacb63 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 a073b2b..abf8102 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);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]