Changeset cb124fc6 for global.c


Ignore:
Timestamp:
Oct 29, 2012, 11:04:56 PM (12 years ago)
Author:
Anders Kaseorg <andersk@mit.edu>
Branches:
master, release-1.10
Children:
0792d99
Parents:
c748e8a
git-author:
Anders Kaseorg <andersk@mit.edu> (06/26/12 01:57:33)
git-committer:
Anders Kaseorg <andersk@mit.edu> (10/29/12 23:04:56)
Message:
Replace deprecated GLib < 2.31.0 mutex APIs

As of GLib 2.31.0,
 - GMutex and GCond can now be statically allocated without explicit
   initialisation.  Dynamic allocation for these types is deprecated.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
File:
1 edited

Legend:

Unmodified
Added
Removed
  • global.c

    rc748e8a rcb124fc6  
    100100
    101101  g->interrupt_count = 0;
     102#if GLIB_CHECK_VERSION(2, 31, 0)
     103  g_mutex_init(&g->interrupt_lock);
     104#else
    102105  g->interrupt_lock = g_mutex_new();
     106#endif
    103107}
    104108
     
    901905static GMutex *owl_global_get_interrupt_lock(owl_global *g)
    902906{
     907#if GLIB_CHECK_VERSION(2, 31, 0)
     908  return &g->interrupt_lock;
     909#else
    903910  return g->interrupt_lock;
     911#endif
    904912}
    905913
Note: See TracChangeset for help on using the changeset viewer.