[libgd/gd.msvc: 3/8] gd-margin-container.c: Fix build on Visual Studio




commit d4120b9ced42140e5284aee299cdc901d2d9a4d8
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Wed Aug 11 15:24:48 2021 +0800

    gd-margin-container.c: Fix build on Visual Studio
    
    Move up the declaration of the '_GdMarginContainerPrivate' struct so that
    Visual Studio will not complain that the stryct is undefined when we use
    'G_DEFINE_TYPE_WITH_CODE (GdMarginContainer...)' with that private struct.
    
    Also stop trying to include config.h since the code has nothing that requires
    configuration macros.

 libgd/gd-margin-container.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)
---
diff --git a/libgd/gd-margin-container.c b/libgd/gd-margin-container.c
index 20f2046..2fbb332 100644
--- a/libgd/gd-margin-container.c
+++ b/libgd/gd-margin-container.c
@@ -19,15 +19,8 @@
  *
  */
 
-#include "config.h"
-
 #include "gd-margin-container.h"
 
-G_DEFINE_TYPE_WITH_CODE (GdMarginContainer, gd_margin_container, GTK_TYPE_BIN,
-                         G_ADD_PRIVATE (GdMarginContainer)
-                         G_IMPLEMENT_INTERFACE (GTK_TYPE_ORIENTABLE,
-                                                NULL))
-
 struct _GdMarginContainerPrivate {
   gint min_margin;
   gint max_margin;
@@ -35,6 +28,11 @@ struct _GdMarginContainerPrivate {
   GtkOrientation orientation;
 };
 
+G_DEFINE_TYPE_WITH_CODE (GdMarginContainer, gd_margin_container, GTK_TYPE_BIN,
+                         G_ADD_PRIVATE (GdMarginContainer)
+                         G_IMPLEMENT_INTERFACE (GTK_TYPE_ORIENTABLE,
+                                                NULL))
+
 enum {
   PROP_MIN_MARGIN = 1,
   PROP_MAX_MARGIN,


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