Merge branch 'backport-1472-thread-deprecation-warnings-glib-2-64' into 'glib-2-64'

Backport !1472 “gthread: ignore deprecated declarations in static inline functions” to glib-2-64

See merge request GNOME/glib!1486
This commit is contained in:
Emmanuele Bassi 2020-05-14 14:05:12 +00:00
commit f66e56bc2b

View File

@ -390,12 +390,14 @@ typedef void GRecMutexLocker;
* Returns: a #GRecMutexLocker
* Since: 2.60
*/
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
static inline GRecMutexLocker *
g_rec_mutex_locker_new (GRecMutex *rec_mutex)
{
g_rec_mutex_lock (rec_mutex);
return (GRecMutexLocker *) rec_mutex;
}
G_GNUC_END_IGNORE_DEPRECATIONS
/**
* g_rec_mutex_locker_free:
@ -407,11 +409,13 @@ g_rec_mutex_locker_new (GRecMutex *rec_mutex)
*
* Since: 2.60
*/
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
static inline void
g_rec_mutex_locker_free (GRecMutexLocker *locker)
{
g_rec_mutex_unlock ((GRecMutex *) locker);
}
G_GNUC_END_IGNORE_DEPRECATIONS
/**
* GRWLockWriterLocker:
@ -494,12 +498,14 @@ typedef void GRWLockWriterLocker;
* Returns: a #GRWLockWriterLocker
* Since: 2.62
*/
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
static inline GRWLockWriterLocker *
g_rw_lock_writer_locker_new (GRWLock *rw_lock)
{
g_rw_lock_writer_lock (rw_lock);
return (GRWLockWriterLocker *) rw_lock;
}
G_GNUC_END_IGNORE_DEPRECATIONS
/**
* g_rw_lock_writer_locker_free:
@ -512,11 +518,13 @@ g_rw_lock_writer_locker_new (GRWLock *rw_lock)
*
* Since: 2.62
*/
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
static inline void
g_rw_lock_writer_locker_free (GRWLockWriterLocker *locker)
{
g_rw_lock_writer_unlock ((GRWLock *) locker);
}
G_GNUC_END_IGNORE_DEPRECATIONS
/**
* GRWLockReaderLocker:
@ -543,12 +551,14 @@ typedef void GRWLockReaderLocker;
* Returns: a #GRWLockReaderLocker
* Since: 2.62
*/
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
static inline GRWLockReaderLocker *
g_rw_lock_reader_locker_new (GRWLock *rw_lock)
{
g_rw_lock_reader_lock (rw_lock);
return (GRWLockReaderLocker *) rw_lock;
}
G_GNUC_END_IGNORE_DEPRECATIONS
/**
* g_rw_lock_reader_locker_free:
@ -561,11 +571,13 @@ g_rw_lock_reader_locker_new (GRWLock *rw_lock)
*
* Since: 2.62
*/
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
static inline void
g_rw_lock_reader_locker_free (GRWLockReaderLocker *locker)
{
g_rw_lock_reader_unlock ((GRWLock *) locker);
}
G_GNUC_END_IGNORE_DEPRECATIONS
G_END_DECLS