[Commits] utils.c 1.36.2.203 1.36.2.204 utils.h 1.20.2.80 1.20.2.81
colin at claws-mail.org
colin at claws-mail.org
Fri Oct 12 12:29:02 CEST 2012
Update of /home/claws-mail/claws/src/common
In directory srv:/tmp/cvs-serv10397/src/common
Modified Files:
Tag: gtk2
utils.c utils.h
Log Message:
2012-10-12 [colin] 3.8.1cvs93
* src/compose.c
* src/prefs_account.c
* src/common/utils.c
* src/common/utils.h
Fix bug #2751 'g_mutex_new/g_mutex_free removed from GLib 2.32'
Thanks to Salvatore de Paolis
Index: utils.c
===================================================================
RCS file: /home/claws-mail/claws/src/common/utils.c,v
retrieving revision 1.36.2.203
retrieving revision 1.36.2.204
diff -u -d -r1.36.2.203 -r1.36.2.204
--- utils.c 10 Oct 2012 07:19:18 -0000 1.36.2.203
+++ utils.c 12 Oct 2012 10:29:00 -0000 1.36.2.204
@@ -5308,3 +5308,23 @@
}
return g_unlink(filename);
}
+
+GMutex *cm_mutex_new(void) {
+#if GLIB_CHECK_VERSION(2,32,0)
+ GMutex *m = mutex;
+ m = g_new0(GMutex, 1);
+ g_mutex_init(m);
+ return m;
+#else
+ return g_mutex_new();
+#endif
+}
+
+void cm_mutex_free(GMutex *mutex) {
+#if GLIB_CHECK_VERSION(2,32,0)
+ g_mutex_clear(mutex);
+ g_free(m);
+#else
+ g_mutex_free(mutex);
+#endif
+}
Index: utils.h
===================================================================
RCS file: /home/claws-mail/claws/src/common/utils.h,v
retrieving revision 1.20.2.80
retrieving revision 1.20.2.81
diff -u -d -r1.20.2.80 -r1.20.2.81
--- utils.h 7 Jul 2012 07:30:56 -0000 1.20.2.80
+++ utils.h 12 Oct 2012 10:29:00 -0000 1.20.2.81
@@ -583,6 +583,10 @@
gboolean sc_g_slist_bigger(GSList *list, gint max);
int claws_unlink(const gchar *filename);
+
+GMutex *cm_mutex_new(void);
+void cm_mutex_free(GMutex *mutex);
+
#ifdef __cplusplus
}
#endif
More information about the Commits
mailing list