glib r7725 - trunk/gobject
- From: matthiasc svn gnome org
 
- To: svn-commits-list gnome org
 
- Subject: glib r7725 - trunk/gobject
 
- Date: Tue,  2 Dec 2008 05:14:00 +0000 (UTC)
 
Author: matthiasc
Date: Tue Dec  2 05:14:00 2008
New Revision: 7725
URL: http://svn.gnome.org/viewvc/glib?rev=7725&view=rev
Log:
        * gtypemodule.c (g_type_module_use): Always reset the use count
        to its previous value before returning FALSE. Pointed out by
        Johan Billien.
Modified:
   trunk/gobject/ChangeLog
   trunk/gobject/gtypemodule.c
Modified: trunk/gobject/gtypemodule.c
==============================================================================
--- trunk/gobject/gtypemodule.c	(original)
+++ trunk/gobject/gtypemodule.c	Tue Dec  2 05:14:00 2008
@@ -238,6 +238,8 @@
  * 
  * Increases the use count of a #GTypeModule by one. If the
  * use count was zero before, the plugin will be loaded.
+ * If loading the plugin fails, the use count is reset to 
+ * its prior value. 
  * 
  * Returns: %FALSE if the plugin needed to be loaded and
  *  loading the plugin failed.
@@ -267,6 +269,7 @@
 	      g_warning ("plugin '%s' failed to register type '%s'\n",
 			 module->name ? module->name : "(unknown)",
 			 g_type_name (type_info->type));
+	      module->use_count--;
 	      return FALSE;
 	    }
 	  
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]