[glib/freeze-shenanigans: 18/21] Unconditionally mark objects as in-construction




commit 5cf611dff379cb2419778dec6e4824edcffa9e46
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Jun 8 14:07:27 2022 -0400

    Unconditionally mark objects as in-construction
    
    This will be used for things other than
    custom constructors in the following commits.

 gobject/gobject.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/gobject/gobject.c b/gobject/gobject.c
index f19c40180e..1d9db7bb84 100644
--- a/gobject/gobject.c
+++ b/gobject/gobject.c
@@ -1272,11 +1272,8 @@ g_object_init (GObject           *object,
       g_object_notify_queue_freeze (object, FALSE);
     }
 
-  if (CLASS_HAS_CUSTOM_CONSTRUCTOR (class))
-    {
-      /* mark object in-construction for notify_queue_thaw() and to allow construct-only properties */
-      set_object_in_construction (object);
-    }
+  /* mark object in-construction for notify_queue_thaw() and to allow construct-only properties */
+  set_object_in_construction (object);
 
   GOBJECT_IF_DEBUG (OBJECTS,
     {
@@ -2164,6 +2161,8 @@ g_object_new_internal (GObjectClass          *class,
 
   g_assert (g_object_is_aligned (object));
 
+  unset_object_in_construction (object);
+
   if (CLASS_HAS_PROPS (class))
     {
       GSList *node;


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