[glib] disable support for unloading of dynamic types



commit 72df62600d1ab473125b6e8beb998e71aa63701e
Author: Ryan Lortie <desrt desrt ca>
Date:   Thu Feb 7 13:50:16 2013 -0500

    disable support for unloading of dynamic types
    
    Experimentally disable the ability to unload dynamic types by refusing
    to drop the last reference on types (effectively turning the type
    unloading into dead code).
    
    The plan is to leave things like this for a stable cycle and only
    proceed with removing the code if we are sure that there are no
    unforeseen problems.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=693351

 gobject/gtype.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/gobject/gtype.c b/gobject/gtype.c
index 6df810c..a821442 100644
--- a/gobject/gtype.c
+++ b/gobject/gtype.c
@@ -2440,6 +2440,14 @@ type_data_unref_U (TypeNode *node,
 		     NODE_NAME (node));
 	  return;
 	}
+      else
+        {
+          /* This is the last reference of a type from a plugin.  We are
+           * experimentally disabling support for unloading type
+           * plugins, so don't allow the last ref to drop.
+           */
+          return;
+        }
 
       g_assert (current > 0);
 


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