mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-27 16:06:16 +01:00
Merge branch 'static-inline-available' into 'master'
glib: annotate static inline functions with G_AVAILABLE-type macros See merge request GNOME/glib!1487
This commit is contained in:
commit
ef1b057977
@ -207,6 +207,11 @@ GLIB_AVAILABLE_MACRO_IN_2_60
|
|||||||
GLIB_AVAILABLE_MACRO_IN_2_62
|
GLIB_AVAILABLE_MACRO_IN_2_62
|
||||||
GLIB_AVAILABLE_MACRO_IN_2_64
|
GLIB_AVAILABLE_MACRO_IN_2_64
|
||||||
GLIB_AVAILABLE_MACRO_IN_2_66
|
GLIB_AVAILABLE_MACRO_IN_2_66
|
||||||
|
GLIB_AVAILABLE_STATIC_INLINE_IN_2_44
|
||||||
|
GLIB_AVAILABLE_STATIC_INLINE_IN_2_60
|
||||||
|
GLIB_AVAILABLE_STATIC_INLINE_IN_2_62
|
||||||
|
GLIB_AVAILABLE_STATIC_INLINE_IN_2_64
|
||||||
|
GLIB_AVAILABLE_STATIC_INLINE_IN_2_66
|
||||||
GLIB_AVAILABLE_TYPE_IN_2_26
|
GLIB_AVAILABLE_TYPE_IN_2_26
|
||||||
GLIB_AVAILABLE_TYPE_IN_2_28
|
GLIB_AVAILABLE_TYPE_IN_2_28
|
||||||
GLIB_AVAILABLE_TYPE_IN_2_30
|
GLIB_AVAILABLE_TYPE_IN_2_30
|
||||||
@ -706,6 +711,7 @@ GLIB_DEPRECATED_FOR
|
|||||||
GLIB_UNAVAILABLE
|
GLIB_UNAVAILABLE
|
||||||
GLIB_UNAVAILABLE_ENUMERATOR
|
GLIB_UNAVAILABLE_ENUMERATOR
|
||||||
GLIB_UNAVAILABLE_MACRO
|
GLIB_UNAVAILABLE_MACRO
|
||||||
|
GLIB_UNAVAILABLE_STATIC_INLINE
|
||||||
GLIB_UNAVAILABLE_TYPE
|
GLIB_UNAVAILABLE_TYPE
|
||||||
G_ANALYZER_ANALYZING
|
G_ANALYZER_ANALYZING
|
||||||
G_ANALYZER_NORETURN
|
G_ANALYZER_NORETURN
|
||||||
|
@ -26,6 +26,8 @@ foreach version : stable_2_series_versions
|
|||||||
'GLIB_DEPRECATED_IN_2_' + version + '_FOR()',
|
'GLIB_DEPRECATED_IN_2_' + version + '_FOR()',
|
||||||
'GLIB_DEPRECATED_IN_2_' + version,
|
'GLIB_DEPRECATED_IN_2_' + version,
|
||||||
|
|
||||||
|
'GLIB_AVAILABLE_STATIC_INLINE_IN_2_' + version,
|
||||||
|
|
||||||
'GLIB_AVAILABLE_ENUMERATOR_IN_2_' + version,
|
'GLIB_AVAILABLE_ENUMERATOR_IN_2_' + version,
|
||||||
'GLIB_DEPRECATED_ENUMERATOR_IN_2_' + version + '_FOR()',
|
'GLIB_DEPRECATED_ENUMERATOR_IN_2_' + version + '_FOR()',
|
||||||
'GLIB_DEPRECATED_ENUMERATOR_IN_2_' + version,
|
'GLIB_DEPRECATED_ENUMERATOR_IN_2_' + version,
|
||||||
@ -57,4 +59,4 @@ endif
|
|||||||
|
|
||||||
subdir('gio')
|
subdir('gio')
|
||||||
subdir('glib')
|
subdir('glib')
|
||||||
subdir('gobject')
|
subdir('gobject')
|
||||||
|
@ -982,6 +982,7 @@
|
|||||||
#define GLIB_DEPRECATED G_DEPRECATED _GLIB_EXTERN
|
#define GLIB_DEPRECATED G_DEPRECATED _GLIB_EXTERN
|
||||||
#define GLIB_DEPRECATED_FOR(f) G_DEPRECATED_FOR(f) _GLIB_EXTERN
|
#define GLIB_DEPRECATED_FOR(f) G_DEPRECATED_FOR(f) _GLIB_EXTERN
|
||||||
#define GLIB_UNAVAILABLE(maj,min) G_UNAVAILABLE(maj,min) _GLIB_EXTERN
|
#define GLIB_UNAVAILABLE(maj,min) G_UNAVAILABLE(maj,min) _GLIB_EXTERN
|
||||||
|
#define GLIB_UNAVAILABLE_STATIC_INLINE(maj,min) G_UNAVAILABLE(maj,min)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(GLIB_DISABLE_DEPRECATION_WARNINGS) && \
|
#if !defined(GLIB_DISABLE_DEPRECATION_WARNINGS) && \
|
||||||
|
@ -499,6 +499,7 @@ typedef void GMainContextPusher GLIB_AVAILABLE_TYPE_IN_2_64;
|
|||||||
* Since: 2.64
|
* Since: 2.64
|
||||||
*/
|
*/
|
||||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||||
|
GLIB_AVAILABLE_STATIC_INLINE_IN_2_64
|
||||||
static inline GMainContextPusher *
|
static inline GMainContextPusher *
|
||||||
g_main_context_pusher_new (GMainContext *main_context)
|
g_main_context_pusher_new (GMainContext *main_context)
|
||||||
{
|
{
|
||||||
@ -520,6 +521,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS
|
|||||||
* Since: 2.64
|
* Since: 2.64
|
||||||
*/
|
*/
|
||||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||||
|
GLIB_AVAILABLE_STATIC_INLINE_IN_2_64
|
||||||
static inline void
|
static inline void
|
||||||
g_main_context_pusher_free (GMainContextPusher *pusher)
|
g_main_context_pusher_free (GMainContextPusher *pusher)
|
||||||
{
|
{
|
||||||
|
@ -197,6 +197,7 @@ gpointer g_try_realloc_n (gpointer mem,
|
|||||||
*
|
*
|
||||||
* Since: 2.44
|
* Since: 2.44
|
||||||
*/
|
*/
|
||||||
|
GLIB_AVAILABLE_STATIC_INLINE_IN_2_44
|
||||||
static inline gpointer
|
static inline gpointer
|
||||||
g_steal_pointer (gpointer pp)
|
g_steal_pointer (gpointer pp)
|
||||||
{
|
{
|
||||||
|
@ -317,6 +317,7 @@ typedef void GMutexLocker;
|
|||||||
* Returns: a #GMutexLocker
|
* Returns: a #GMutexLocker
|
||||||
* Since: 2.44
|
* Since: 2.44
|
||||||
*/
|
*/
|
||||||
|
GLIB_AVAILABLE_STATIC_INLINE_IN_2_44
|
||||||
static inline GMutexLocker *
|
static inline GMutexLocker *
|
||||||
g_mutex_locker_new (GMutex *mutex)
|
g_mutex_locker_new (GMutex *mutex)
|
||||||
{
|
{
|
||||||
@ -334,6 +335,7 @@ g_mutex_locker_new (GMutex *mutex)
|
|||||||
*
|
*
|
||||||
* Since: 2.44
|
* Since: 2.44
|
||||||
*/
|
*/
|
||||||
|
GLIB_AVAILABLE_STATIC_INLINE_IN_2_44
|
||||||
static inline void
|
static inline void
|
||||||
g_mutex_locker_free (GMutexLocker *locker)
|
g_mutex_locker_free (GMutexLocker *locker)
|
||||||
{
|
{
|
||||||
@ -391,6 +393,7 @@ typedef void GRecMutexLocker;
|
|||||||
* Since: 2.60
|
* Since: 2.60
|
||||||
*/
|
*/
|
||||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||||
|
GLIB_AVAILABLE_STATIC_INLINE_IN_2_60
|
||||||
static inline GRecMutexLocker *
|
static inline GRecMutexLocker *
|
||||||
g_rec_mutex_locker_new (GRecMutex *rec_mutex)
|
g_rec_mutex_locker_new (GRecMutex *rec_mutex)
|
||||||
{
|
{
|
||||||
@ -410,6 +413,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS
|
|||||||
* Since: 2.60
|
* Since: 2.60
|
||||||
*/
|
*/
|
||||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||||
|
GLIB_AVAILABLE_STATIC_INLINE_IN_2_60
|
||||||
static inline void
|
static inline void
|
||||||
g_rec_mutex_locker_free (GRecMutexLocker *locker)
|
g_rec_mutex_locker_free (GRecMutexLocker *locker)
|
||||||
{
|
{
|
||||||
@ -499,6 +503,7 @@ typedef void GRWLockWriterLocker;
|
|||||||
* Since: 2.62
|
* Since: 2.62
|
||||||
*/
|
*/
|
||||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||||
|
GLIB_AVAILABLE_STATIC_INLINE_IN_2_62
|
||||||
static inline GRWLockWriterLocker *
|
static inline GRWLockWriterLocker *
|
||||||
g_rw_lock_writer_locker_new (GRWLock *rw_lock)
|
g_rw_lock_writer_locker_new (GRWLock *rw_lock)
|
||||||
{
|
{
|
||||||
@ -519,6 +524,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS
|
|||||||
* Since: 2.62
|
* Since: 2.62
|
||||||
*/
|
*/
|
||||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||||
|
GLIB_AVAILABLE_STATIC_INLINE_IN_2_62
|
||||||
static inline void
|
static inline void
|
||||||
g_rw_lock_writer_locker_free (GRWLockWriterLocker *locker)
|
g_rw_lock_writer_locker_free (GRWLockWriterLocker *locker)
|
||||||
{
|
{
|
||||||
@ -552,6 +558,7 @@ typedef void GRWLockReaderLocker;
|
|||||||
* Since: 2.62
|
* Since: 2.62
|
||||||
*/
|
*/
|
||||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||||
|
GLIB_AVAILABLE_STATIC_INLINE_IN_2_62
|
||||||
static inline GRWLockReaderLocker *
|
static inline GRWLockReaderLocker *
|
||||||
g_rw_lock_reader_locker_new (GRWLock *rw_lock)
|
g_rw_lock_reader_locker_new (GRWLock *rw_lock)
|
||||||
{
|
{
|
||||||
@ -572,6 +579,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS
|
|||||||
* Since: 2.62
|
* Since: 2.62
|
||||||
*/
|
*/
|
||||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||||
|
GLIB_AVAILABLE_STATIC_INLINE_IN_2_62
|
||||||
static inline void
|
static inline void
|
||||||
g_rw_lock_reader_locker_free (GRWLockReaderLocker *locker)
|
g_rw_lock_reader_locker_free (GRWLockReaderLocker *locker)
|
||||||
{
|
{
|
||||||
|
@ -646,11 +646,13 @@
|
|||||||
|
|
||||||
#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_44
|
#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_44
|
||||||
# define GLIB_AVAILABLE_IN_2_44 GLIB_UNAVAILABLE(2, 44)
|
# define GLIB_AVAILABLE_IN_2_44 GLIB_UNAVAILABLE(2, 44)
|
||||||
|
# define GLIB_AVAILABLE_STATIC_INLINE_IN_2_44 GLIB_UNAVAILABLE_STATIC_INLINE(2, 44)
|
||||||
# define GLIB_AVAILABLE_MACRO_IN_2_44 GLIB_UNAVAILABLE_MACRO(2, 44)
|
# define GLIB_AVAILABLE_MACRO_IN_2_44 GLIB_UNAVAILABLE_MACRO(2, 44)
|
||||||
# define GLIB_AVAILABLE_ENUMERATOR_IN_2_44 GLIB_UNAVAILABLE_ENUMERATOR(2, 44)
|
# define GLIB_AVAILABLE_ENUMERATOR_IN_2_44 GLIB_UNAVAILABLE_ENUMERATOR(2, 44)
|
||||||
# define GLIB_AVAILABLE_TYPE_IN_2_44 GLIB_UNAVAILABLE_TYPE(2, 44)
|
# define GLIB_AVAILABLE_TYPE_IN_2_44 GLIB_UNAVAILABLE_TYPE(2, 44)
|
||||||
#else
|
#else
|
||||||
# define GLIB_AVAILABLE_IN_2_44 _GLIB_EXTERN
|
# define GLIB_AVAILABLE_IN_2_44 _GLIB_EXTERN
|
||||||
|
# define GLIB_AVAILABLE_STATIC_INLINE_IN_2_44
|
||||||
# define GLIB_AVAILABLE_MACRO_IN_2_44
|
# define GLIB_AVAILABLE_MACRO_IN_2_44
|
||||||
# define GLIB_AVAILABLE_ENUMERATOR_IN_2_44
|
# define GLIB_AVAILABLE_ENUMERATOR_IN_2_44
|
||||||
# define GLIB_AVAILABLE_TYPE_IN_2_44
|
# define GLIB_AVAILABLE_TYPE_IN_2_44
|
||||||
@ -898,11 +900,13 @@
|
|||||||
|
|
||||||
#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_60
|
#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_60
|
||||||
# define GLIB_AVAILABLE_IN_2_60 GLIB_UNAVAILABLE(2, 60)
|
# define GLIB_AVAILABLE_IN_2_60 GLIB_UNAVAILABLE(2, 60)
|
||||||
|
# define GLIB_AVAILABLE_STATIC_INLINE_IN_2_60 GLIB_UNAVAILABLE_STATIC_INLINE(2, 60)
|
||||||
# define GLIB_AVAILABLE_MACRO_IN_2_60 GLIB_UNAVAILABLE_MACRO(2, 60)
|
# define GLIB_AVAILABLE_MACRO_IN_2_60 GLIB_UNAVAILABLE_MACRO(2, 60)
|
||||||
# define GLIB_AVAILABLE_ENUMERATOR_IN_2_60 GLIB_UNAVAILABLE_ENUMERATOR(2, 60)
|
# define GLIB_AVAILABLE_ENUMERATOR_IN_2_60 GLIB_UNAVAILABLE_ENUMERATOR(2, 60)
|
||||||
# define GLIB_AVAILABLE_TYPE_IN_2_60 GLIB_UNAVAILABLE_TYPE(2, 60)
|
# define GLIB_AVAILABLE_TYPE_IN_2_60 GLIB_UNAVAILABLE_TYPE(2, 60)
|
||||||
#else
|
#else
|
||||||
# define GLIB_AVAILABLE_IN_2_60 _GLIB_EXTERN
|
# define GLIB_AVAILABLE_IN_2_60 _GLIB_EXTERN
|
||||||
|
# define GLIB_AVAILABLE_STATIC_INLINE_IN_2_60
|
||||||
# define GLIB_AVAILABLE_MACRO_IN_2_60
|
# define GLIB_AVAILABLE_MACRO_IN_2_60
|
||||||
# define GLIB_AVAILABLE_ENUMERATOR_IN_2_60
|
# define GLIB_AVAILABLE_ENUMERATOR_IN_2_60
|
||||||
# define GLIB_AVAILABLE_TYPE_IN_2_60
|
# define GLIB_AVAILABLE_TYPE_IN_2_60
|
||||||
@ -930,11 +934,13 @@
|
|||||||
|
|
||||||
#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_62
|
#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_62
|
||||||
# define GLIB_AVAILABLE_IN_2_62 GLIB_UNAVAILABLE(2, 62)
|
# define GLIB_AVAILABLE_IN_2_62 GLIB_UNAVAILABLE(2, 62)
|
||||||
|
# define GLIB_AVAILABLE_STATIC_INLINE_IN_2_62 GLIB_UNAVAILABLE_STATIC_INLINE(2, 62)
|
||||||
# define GLIB_AVAILABLE_MACRO_IN_2_62 GLIB_UNAVAILABLE_MACRO(2, 62)
|
# define GLIB_AVAILABLE_MACRO_IN_2_62 GLIB_UNAVAILABLE_MACRO(2, 62)
|
||||||
# define GLIB_AVAILABLE_ENUMERATOR_IN_2_62 GLIB_UNAVAILABLE_ENUMERATOR(2, 62)
|
# define GLIB_AVAILABLE_ENUMERATOR_IN_2_62 GLIB_UNAVAILABLE_ENUMERATOR(2, 62)
|
||||||
# define GLIB_AVAILABLE_TYPE_IN_2_62 GLIB_UNAVAILABLE_TYPE(2, 62)
|
# define GLIB_AVAILABLE_TYPE_IN_2_62 GLIB_UNAVAILABLE_TYPE(2, 62)
|
||||||
#else
|
#else
|
||||||
# define GLIB_AVAILABLE_IN_2_62 _GLIB_EXTERN
|
# define GLIB_AVAILABLE_IN_2_62 _GLIB_EXTERN
|
||||||
|
# define GLIB_AVAILABLE_STATIC_INLINE_IN_2_62
|
||||||
# define GLIB_AVAILABLE_MACRO_IN_2_62
|
# define GLIB_AVAILABLE_MACRO_IN_2_62
|
||||||
# define GLIB_AVAILABLE_ENUMERATOR_IN_2_62
|
# define GLIB_AVAILABLE_ENUMERATOR_IN_2_62
|
||||||
# define GLIB_AVAILABLE_TYPE_IN_2_62
|
# define GLIB_AVAILABLE_TYPE_IN_2_62
|
||||||
@ -962,11 +968,13 @@
|
|||||||
|
|
||||||
#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_64
|
#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_64
|
||||||
# define GLIB_AVAILABLE_IN_2_64 GLIB_UNAVAILABLE(2, 64)
|
# define GLIB_AVAILABLE_IN_2_64 GLIB_UNAVAILABLE(2, 64)
|
||||||
|
# define GLIB_AVAILABLE_STATIC_INLINE_IN_2_64 GLIB_UNAVAILABLE_STATIC_INLINE(2, 64)
|
||||||
# define GLIB_AVAILABLE_MACRO_IN_2_64 GLIB_UNAVAILABLE_MACRO(2, 64)
|
# define GLIB_AVAILABLE_MACRO_IN_2_64 GLIB_UNAVAILABLE_MACRO(2, 64)
|
||||||
# define GLIB_AVAILABLE_ENUMERATOR_IN_2_64 GLIB_UNAVAILABLE_ENUMERATOR(2, 64)
|
# define GLIB_AVAILABLE_ENUMERATOR_IN_2_64 GLIB_UNAVAILABLE_ENUMERATOR(2, 64)
|
||||||
# define GLIB_AVAILABLE_TYPE_IN_2_64 GLIB_UNAVAILABLE_TYPE(2, 64)
|
# define GLIB_AVAILABLE_TYPE_IN_2_64 GLIB_UNAVAILABLE_TYPE(2, 64)
|
||||||
#else
|
#else
|
||||||
# define GLIB_AVAILABLE_IN_2_64 _GLIB_EXTERN
|
# define GLIB_AVAILABLE_IN_2_64 _GLIB_EXTERN
|
||||||
|
# define GLIB_AVAILABLE_STATIC_INLINE_IN_2_64
|
||||||
# define GLIB_AVAILABLE_MACRO_IN_2_64
|
# define GLIB_AVAILABLE_MACRO_IN_2_64
|
||||||
# define GLIB_AVAILABLE_ENUMERATOR_IN_2_64
|
# define GLIB_AVAILABLE_ENUMERATOR_IN_2_64
|
||||||
# define GLIB_AVAILABLE_TYPE_IN_2_64
|
# define GLIB_AVAILABLE_TYPE_IN_2_64
|
||||||
@ -994,11 +1002,13 @@
|
|||||||
|
|
||||||
#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_66
|
#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_66
|
||||||
# define GLIB_AVAILABLE_IN_2_66 GLIB_UNAVAILABLE(2, 66)
|
# define GLIB_AVAILABLE_IN_2_66 GLIB_UNAVAILABLE(2, 66)
|
||||||
|
# define GLIB_AVAILABLE_STATIC_INLINE_IN_2_66 GLIB_UNAVAILABLE_STATIC_INLINE(2, 66)
|
||||||
# define GLIB_AVAILABLE_MACRO_IN_2_66 GLIB_UNAVAILABLE_MACRO(2, 66)
|
# define GLIB_AVAILABLE_MACRO_IN_2_66 GLIB_UNAVAILABLE_MACRO(2, 66)
|
||||||
# define GLIB_AVAILABLE_ENUMERATOR_IN_2_66 GLIB_UNAVAILABLE_ENUMERATOR(2, 66)
|
# define GLIB_AVAILABLE_ENUMERATOR_IN_2_66 GLIB_UNAVAILABLE_ENUMERATOR(2, 66)
|
||||||
# define GLIB_AVAILABLE_TYPE_IN_2_66 GLIB_UNAVAILABLE_TYPE(2, 66)
|
# define GLIB_AVAILABLE_TYPE_IN_2_66 GLIB_UNAVAILABLE_TYPE(2, 66)
|
||||||
#else
|
#else
|
||||||
# define GLIB_AVAILABLE_IN_2_66 _GLIB_EXTERN
|
# define GLIB_AVAILABLE_IN_2_66 _GLIB_EXTERN
|
||||||
|
# define GLIB_AVAILABLE_STATIC_INLINE_IN_2_66
|
||||||
# define GLIB_AVAILABLE_MACRO_IN_2_66
|
# define GLIB_AVAILABLE_MACRO_IN_2_66
|
||||||
# define GLIB_AVAILABLE_ENUMERATOR_IN_2_66
|
# define GLIB_AVAILABLE_ENUMERATOR_IN_2_66
|
||||||
# define GLIB_AVAILABLE_TYPE_IN_2_66
|
# define GLIB_AVAILABLE_TYPE_IN_2_66
|
||||||
|
Loading…
Reference in New Issue
Block a user