[gimp/wip/nielsdg/g-define-boxed-type: 3/4] libgimpbase: Use G_DEFINE_BOXED_TYPE()



commit 7af88224a9a2e4b5ba617bb648ee19e22e2286bc
Author: Niels De Graef <nielsdegraef gmail com>
Date:   Wed Jul 17 07:02:04 2019 +0200

    libgimpbase: Use G_DEFINE_BOXED_TYPE()
    
    This isn't any functional change, but allows us to get rid of some of
    the GObject boilerplate.

 libgimpbase/gimpparasite.c | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)
---
diff --git a/libgimpbase/gimpparasite.c b/libgimpbase/gimpparasite.c
index 11a1480fd2..b7f19b10fb 100644
--- a/libgimpbase/gimpparasite.c
+++ b/libgimpbase/gimpparasite.c
@@ -55,19 +55,7 @@
  * GIMP_TYPE_PARASITE
  */
 
-GType
-gimp_parasite_get_type (void)
-{
-  static GType type = 0;
-
-  if (! type)
-    type = g_boxed_type_register_static ("GimpParasite",
-                                         (GBoxedCopyFunc) gimp_parasite_copy,
-                                         (GBoxedFreeFunc) gimp_parasite_free);
-
-  return type;
-}
-
+G_DEFINE_BOXED_TYPE (GimpParasite, gimp_parasite, gimp_parasite_copy, gimp_parasite_free)
 
 /*
  * GIMP_TYPE_PARAM_PARASITE


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