glib r7793 - branches/glib-2-18/gobject
- From: matthiasc svn gnome org
- To: svn-commits-list gnome org
- Subject: glib r7793 - branches/glib-2-18/gobject
- Date: Fri, 9 Jan 2009 06:19:29 +0000 (UTC)
Author: matthiasc
Date: Fri Jan 9 06:19:28 2009
New Revision: 7793
URL: http://svn.gnome.org/viewvc/glib?rev=7793&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:
branches/glib-2-18/gobject/ChangeLog
branches/glib-2-18/gobject/gtypemodule.c
Modified: branches/glib-2-18/gobject/gtypemodule.c
==============================================================================
--- branches/glib-2-18/gobject/gtypemodule.c (original)
+++ branches/glib-2-18/gobject/gtypemodule.c Fri Jan 9 06:19:28 2009
@@ -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]