[libgda] GI: GdaMetaStore using G_DEFINE_BOXED



commit 4639a18b63123d99d4a6e01bf2063d81057da7ee
Author: Daniel Espinosa <esodan gmail com>
Date:   Tue Oct 9 18:52:52 2018 -0500

    GI: GdaMetaStore using G_DEFINE_BOXED

 libgda/gda-meta-store.c | 26 +++-----------------------
 1 file changed, 3 insertions(+), 23 deletions(-)
---
diff --git a/libgda/gda-meta-store.c b/libgda/gda-meta-store.c
index 9fbc72ba6..fdb2fe347 100644
--- a/libgda/gda-meta-store.c
+++ b/libgda/gda-meta-store.c
@@ -238,29 +238,6 @@ gda_value_get_meta_store_change (GValue *value)
        return val;
 }
 
-
-
-/*
-   Register GdaMetaContext type
-*/
-GType
-gda_meta_context_get_type (void)
-{
-       static GType type = 0;
-
-       if (G_UNLIKELY (type == 0)) {
-               static GMutex registering;
-               g_mutex_lock (&registering);
-                if (type == 0)
-                       type = g_boxed_type_register_static ("GdaMetaContext",
-                                                            (GBoxedCopyFunc) gda_meta_context_copy,
-                                                            (GBoxedFreeFunc) gda_meta_context_free);
-               g_mutex_unlock (&registering);
-       }
-
-       return type;
-}
-
 /*
        IMPLEMENTATION NOTES:
        In this implementation, for 5.2, the new API for GdaMetaContext struct doesn't touch size, 
column_names and
@@ -453,6 +430,9 @@ gda_meta_context_free (GdaMetaContext *ctx)
        // REMIND: ctx->column_names and ctx->column_values must not be freed
 }
 
+
+G_DEFINE_BOXED_TYPE(GdaMetaContext, gda_meta_context, gda_meta_context_copy, gda_meta_context_free)
+
 /*
  * Main static functions
  */


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