From e7d091dec19de58e5a2ac80c0ffecf0c127a093c Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Wed, 6 Mar 2019 11:26:28 +0000 Subject: [PATCH] gversionmacros: add version macros for GLib 2.62 Signed-off-by: Philip Withnall --- docs/reference/gio/meson.build | 3 +++ docs/reference/glib/meson.build | 3 +++ docs/reference/gobject/meson.build | 3 +++ glib/gversionmacros.h | 24 ++++++++++++++++++++++++ 4 files changed, 33 insertions(+) diff --git a/docs/reference/gio/meson.build b/docs/reference/gio/meson.build index 045431868..5244050cc 100644 --- a/docs/reference/gio/meson.build +++ b/docs/reference/gio/meson.build @@ -141,6 +141,7 @@ if get_option('gtk_doc') 'GLIB_AVAILABLE_IN_2_56', 'GLIB_AVAILABLE_IN_2_58', 'GLIB_AVAILABLE_IN_2_60', + 'GLIB_AVAILABLE_IN_2_62', 'GLIB_DEPRECATED_IN_2_26', 'GLIB_DEPRECATED_IN_2_26_FOR', 'GLIB_DEPRECATED_IN_2_28', @@ -177,6 +178,8 @@ if get_option('gtk_doc') 'GLIB_DEPRECATED_IN_2_58_FOR', 'GLIB_DEPRECATED_IN_2_60', 'GLIB_DEPRECATED_IN_2_60_FOR', + 'GLIB_DEPRECATED_IN_2_62', + 'GLIB_DEPRECATED_IN_2_62_FOR', ] # FIXME: More win32 headers were added to fix building gio-scan diff --git a/docs/reference/glib/meson.build b/docs/reference/glib/meson.build index 9699fec48..ff41ed324 100644 --- a/docs/reference/glib/meson.build +++ b/docs/reference/glib/meson.build @@ -63,6 +63,7 @@ if get_option('gtk_doc') 'GLIB_AVAILABLE_IN_2_56', 'GLIB_AVAILABLE_IN_2_58', 'GLIB_AVAILABLE_IN_2_60', + 'GLIB_AVAILABLE_IN_2_62', 'GLIB_DEPRECATED_IN_2_26', 'GLIB_DEPRECATED_IN_2_26_FOR', 'GLIB_DEPRECATED_IN_2_28', @@ -99,6 +100,8 @@ if get_option('gtk_doc') 'GLIB_DEPRECATED_IN_2_58_FOR', 'GLIB_DEPRECATED_IN_2_60', 'GLIB_DEPRECATED_IN_2_60_FOR', + 'GLIB_DEPRECATED_IN_2_62', + 'GLIB_DEPRECATED_IN_2_62_FOR', ] docpath = join_paths(glib_datadir, 'gtk-doc', 'html') diff --git a/docs/reference/gobject/meson.build b/docs/reference/gobject/meson.build index 175520b64..e7267bda0 100644 --- a/docs/reference/gobject/meson.build +++ b/docs/reference/gobject/meson.build @@ -33,6 +33,7 @@ if get_option('gtk_doc') 'GLIB_AVAILABLE_IN_2_56', 'GLIB_AVAILABLE_IN_2_58', 'GLIB_AVAILABLE_IN_2_60', + 'GLIB_AVAILABLE_IN_2_62', 'GLIB_DEPRECATED_IN_2_26', 'GLIB_DEPRECATED_IN_2_26_FOR', 'GLIB_DEPRECATED_IN_2_28', @@ -69,6 +70,8 @@ if get_option('gtk_doc') 'GLIB_DEPRECATED_IN_2_58_FOR', 'GLIB_DEPRECATED_IN_2_60', 'GLIB_DEPRECATED_IN_2_60_FOR', + 'GLIB_DEPRECATED_IN_2_62', + 'GLIB_DEPRECATED_IN_2_62_FOR', ] docpath = join_paths(glib_datadir, 'gtk-doc', 'html') diff --git a/glib/gversionmacros.h b/glib/gversionmacros.h index 0ba8f635b..e66afdd91 100644 --- a/glib/gversionmacros.h +++ b/glib/gversionmacros.h @@ -215,6 +215,16 @@ */ #define GLIB_VERSION_2_60 (G_ENCODE_VERSION (2, 60)) +/** + * GLIB_VERSION_2_62: + * + * A macro that evaluates to the 2.62 version of GLib, in a format + * that can be used by the C pre-processor. + * + * Since: 2.62 + */ +#define GLIB_VERSION_2_62 (G_ENCODE_VERSION (2, 62)) + /* evaluates to the current stable version; for development cycles, * this means the next stable target */ @@ -558,4 +568,18 @@ # define GLIB_AVAILABLE_IN_2_60 _GLIB_EXTERN #endif +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_62 +# define GLIB_DEPRECATED_IN_2_62 GLIB_DEPRECATED +# define GLIB_DEPRECATED_IN_2_62_FOR(f) GLIB_DEPRECATED_FOR(f) +#else +# define GLIB_DEPRECATED_IN_2_62 _GLIB_EXTERN +# define GLIB_DEPRECATED_IN_2_62_FOR(f) _GLIB_EXTERN +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_62 +# define GLIB_AVAILABLE_IN_2_62 GLIB_UNAVAILABLE(2, 62) +#else +# define GLIB_AVAILABLE_IN_2_62 _GLIB_EXTERN +#endif + #endif /* __G_VERSION_MACROS_H__ */