diff --git a/docs/reference/glib/compiling.xml b/docs/reference/glib/compiling.xml
index 6a8626488..02971a60f 100644
--- a/docs/reference/glib/compiling.xml
+++ b/docs/reference/glib/compiling.xml
@@ -93,11 +93,10 @@ this range will trigger compiler warnings.
-The older deprecation mechanism of hiding deprecated interfaces
+Since GLib 2.62, the older deprecation mechanism of hiding deprecated interfaces
entirely from the compiler by using the preprocessor symbol
-G_DISABLE_DEPRECATED is still used for deprecated macros,
-enumeration values, etc. To detect uses of these in your code,
-use the commandline option -DG_DISABLE_DEPRECATED.
+G_DISABLE_DEPRECATED has been removed. All deprecations
+are now handled using the above mechanism.
diff --git a/docs/reference/meson.build b/docs/reference/meson.build
index e4dbf3f12..8da9665f4 100644
--- a/docs/reference/meson.build
+++ b/docs/reference/meson.build
@@ -26,7 +26,6 @@ foreach version : stable_2_series_versions
endforeach
gtkdoc_common_scan_args = [
- '--deprecated-guards=G_DISABLE_DEPRECATED',
'--ignore-decorators=' + '|'.join(ignore_decorators),
]
diff --git a/gio/fam/meson.build b/gio/fam/meson.build
index d24670a63..8019fe5c4 100644
--- a/gio/fam/meson.build
+++ b/gio/fam/meson.build
@@ -3,7 +3,7 @@ if not get_option('fam')
endif
fam_dep = cc.find_library('fam')
-fam_c_args = ['-DG_DISABLE_DEPRECATED'] + gio_c_args
+fam_c_args = gio_c_args
if cc.has_function('FAMNoExists', dependencies : fam_dep)
fam_c_args += '-DHAVE_FAM_NO_EXISTS=1'
endif
diff --git a/gio/gasyncinitable.c b/gio/gasyncinitable.c
index bc5e40e7b..8936f98b2 100644
--- a/gio/gasyncinitable.c
+++ b/gio/gasyncinitable.c
@@ -369,6 +369,7 @@ g_async_initable_new_async (GType object_type,
* Deprecated: 2.54: Use g_object_new_with_properties() and
* g_async_initable_init_async() instead. See #GParameter for more information.
*/
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
void
g_async_initable_newv_async (GType object_type,
guint n_parameters,
@@ -382,15 +383,14 @@ g_async_initable_newv_async (GType object_type,
g_return_if_fail (G_TYPE_IS_ASYNC_INITABLE (object_type));
-G_GNUC_BEGIN_IGNORE_DEPRECATIONS
obj = g_object_newv (object_type, n_parameters, parameters);
-G_GNUC_END_IGNORE_DEPRECATIONS
g_async_initable_init_async (G_ASYNC_INITABLE (obj),
io_priority, cancellable,
callback, user_data);
g_object_unref (obj); /* Passed ownership to async call */
}
+G_GNUC_END_IGNORE_DEPRECATIONS
/**
* g_async_initable_new_valist_async:
diff --git a/gio/gasyncinitable.h b/gio/gasyncinitable.h
index 8b05a22e7..1c713a13f 100644
--- a/gio/gasyncinitable.h
+++ b/gio/gasyncinitable.h
@@ -95,6 +95,8 @@ void g_async_initable_new_async (GType object_type,
gpointer user_data,
const gchar *first_property_name,
...);
+
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
GLIB_DEPRECATED_IN_2_54_FOR(g_object_new_with_properties and g_async_initable_init_async)
void g_async_initable_newv_async (GType object_type,
guint n_parameters,
@@ -103,6 +105,8 @@ void g_async_initable_newv_async (GType object_type,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
+G_GNUC_END_IGNORE_DEPRECATIONS
+
GLIB_AVAILABLE_IN_ALL
void g_async_initable_new_valist_async (GType object_type,
const gchar *first_property_name,
diff --git a/gio/gdesktopappinfo.c b/gio/gdesktopappinfo.c
index 77e385aa5..69018cfdd 100644
--- a/gio/gdesktopappinfo.c
+++ b/gio/gdesktopappinfo.c
@@ -24,6 +24,10 @@
#include "config.h"
+/* For the #GDesktopAppInfoLookup macros; since macro deprecation is implemented
+ * in the preprocessor, we need to define this before including glib.h*/
+#define GLIB_DISABLE_DEPRECATION_WARNINGS
+
#include
#include
#include
@@ -4555,6 +4559,9 @@ g_app_info_get_all (void)
*
* #GDesktopAppInfoLookup is an opaque data structure and can only be accessed
* using the following functions.
+ *
+ * Deprecated: 2.28: The #GDesktopAppInfoLookup interface is deprecated and
+ * unused by GIO.
**/
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
@@ -4575,17 +4582,18 @@ g_desktop_app_info_lookup_default_init (GDesktopAppInfoLookupInterface *iface)
* @uri_scheme: a string containing a URI scheme.
*
* Gets the default application for launching applications
- * using this URI scheme for a particular GDesktopAppInfoLookup
+ * using this URI scheme for a particular #GDesktopAppInfoLookup
* implementation.
*
- * The GDesktopAppInfoLookup interface and this function is used
+ * The #GDesktopAppInfoLookup interface and this function is used
* to implement g_app_info_get_default_for_uri_scheme() backends
* in a GIO module. There is no reason for applications to use it
* directly. Applications should use g_app_info_get_default_for_uri_scheme().
*
* Returns: (transfer full): #GAppInfo for given @uri_scheme or %NULL on error.
*
- * Deprecated: The #GDesktopAppInfoLookup interface is deprecated and unused by gio.
+ * Deprecated: 2.28: The #GDesktopAppInfoLookup interface is deprecated and
+ * unused by GIO.
*/
GAppInfo *
g_desktop_app_info_lookup_get_default_for_uri_scheme (GDesktopAppInfoLookup *lookup,
diff --git a/gio/gdesktopappinfo.h b/gio/gdesktopappinfo.h
index 1254038a4..591bdd2ef 100644
--- a/gio/gdesktopappinfo.h
+++ b/gio/gdesktopappinfo.h
@@ -106,22 +106,21 @@ GLIB_AVAILABLE_IN_2_38
gchar * g_desktop_app_info_get_action_name (GDesktopAppInfo *info,
const gchar *action_name);
-#ifndef G_DISABLE_DEPRECATED
-
-#define G_TYPE_DESKTOP_APP_INFO_LOOKUP (g_desktop_app_info_lookup_get_type ())
-#define G_DESKTOP_APP_INFO_LOOKUP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_DESKTOP_APP_INFO_LOOKUP, GDesktopAppInfoLookup))
-#define G_IS_DESKTOP_APP_INFO_LOOKUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_DESKTOP_APP_INFO_LOOKUP))
-#define G_DESKTOP_APP_INFO_LOOKUP_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_DESKTOP_APP_INFO_LOOKUP, GDesktopAppInfoLookupIface))
+#define G_TYPE_DESKTOP_APP_INFO_LOOKUP (g_desktop_app_info_lookup_get_type ()) GLIB_DEPRECATED_MACRO_IN_2_28
+#define G_DESKTOP_APP_INFO_LOOKUP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_DESKTOP_APP_INFO_LOOKUP, GDesktopAppInfoLookup)) GLIB_DEPRECATED_MACRO_IN_2_28
+#define G_IS_DESKTOP_APP_INFO_LOOKUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_DESKTOP_APP_INFO_LOOKUP)) GLIB_DEPRECATED_MACRO_IN_2_28
+#define G_DESKTOP_APP_INFO_LOOKUP_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_DESKTOP_APP_INFO_LOOKUP, GDesktopAppInfoLookupIface)) GLIB_DEPRECATED_MACRO_IN_2_28
/**
* G_DESKTOP_APP_INFO_LOOKUP_EXTENSION_POINT_NAME:
*
* Extension point for default handler to URI association. See
* [Extending GIO][extending-gio].
+ *
+ * Deprecated: 2.28: The #GDesktopAppInfoLookup interface is deprecated and
+ * unused by GIO.
*/
-#define G_DESKTOP_APP_INFO_LOOKUP_EXTENSION_POINT_NAME "gio-desktop-app-info-lookup"
-
-#endif /* G_DISABLE_DEPRECATED */
+#define G_DESKTOP_APP_INFO_LOOKUP_EXTENSION_POINT_NAME "gio-desktop-app-info-lookup" GLIB_DEPRECATED_MACRO_IN_2_28
/**
* GDesktopAppInfoLookupIface:
diff --git a/gio/gdtlsconnection.c b/gio/gdtlsconnection.c
index cbc25d4f2..ad8fe3548 100644
--- a/gio/gdtlsconnection.c
+++ b/gio/gdtlsconnection.c
@@ -638,6 +638,7 @@ g_dtls_connection_get_require_close_notify (GDtlsConnection *conn)
* required for compatibility. Also, rehandshaking has been removed
* from the TLS protocol in TLS 1.3.
*/
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
void
g_dtls_connection_set_rehandshake_mode (GDtlsConnection *conn,
GTlsRehandshakeMode mode)
@@ -648,6 +649,7 @@ g_dtls_connection_set_rehandshake_mode (GDtlsConnection *conn,
"rehandshake-mode", mode,
NULL);
}
+G_GNUC_END_IGNORE_DEPRECATIONS
/**
* g_dtls_connection_get_rehandshake_mode:
@@ -660,6 +662,7 @@ g_dtls_connection_set_rehandshake_mode (GDtlsConnection *conn,
*
* Since: 2.48
*/
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
GTlsRehandshakeMode
g_dtls_connection_get_rehandshake_mode (GDtlsConnection *conn)
{
@@ -672,6 +675,7 @@ g_dtls_connection_get_rehandshake_mode (GDtlsConnection *conn)
NULL);
return mode;
}
+G_GNUC_END_IGNORE_DEPRECATIONS
/**
* g_dtls_connection_handshake:
diff --git a/gio/gdtlsconnection.h b/gio/gdtlsconnection.h
index 364be935e..3901cdc9e 100644
--- a/gio/gdtlsconnection.h
+++ b/gio/gdtlsconnection.h
@@ -129,11 +129,13 @@ void g_dtls_connection_set_require_close_notify (GDtlsConnec
GLIB_AVAILABLE_IN_2_48
gboolean g_dtls_connection_get_require_close_notify (GDtlsConnection *conn);
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
GLIB_DEPRECATED_IN_2_60
void g_dtls_connection_set_rehandshake_mode (GDtlsConnection *conn,
GTlsRehandshakeMode mode);
GLIB_DEPRECATED_IN_2_60
GTlsRehandshakeMode g_dtls_connection_get_rehandshake_mode (GDtlsConnection *conn);
+G_GNUC_END_IGNORE_DEPRECATIONS
GLIB_AVAILABLE_IN_2_48
gboolean g_dtls_connection_handshake (GDtlsConnection *conn,
diff --git a/gio/ginitable.c b/gio/ginitable.c
index b5b500618..f3fd76ffc 100644
--- a/gio/ginitable.c
+++ b/gio/ginitable.c
@@ -187,6 +187,7 @@ g_initable_new (GType object_type,
* Deprecated: 2.54: Use g_object_new_with_properties() and
* g_initable_init() instead. See #GParameter for more information.
*/
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
gpointer
g_initable_newv (GType object_type,
guint n_parameters,
@@ -198,9 +199,7 @@ g_initable_newv (GType object_type,
g_return_val_if_fail (G_TYPE_IS_INITABLE (object_type), NULL);
-G_GNUC_BEGIN_IGNORE_DEPRECATIONS
obj = g_object_newv (object_type, n_parameters, parameters);
-G_GNUC_END_IGNORE_DEPRECATIONS
if (!g_initable_init (G_INITABLE (obj), cancellable, error))
{
@@ -210,6 +209,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS
return (gpointer)obj;
}
+G_GNUC_END_IGNORE_DEPRECATIONS
/**
* g_initable_new_valist:
diff --git a/gio/ginitable.h b/gio/ginitable.h
index c29098d53..3124f028f 100644
--- a/gio/ginitable.h
+++ b/gio/ginitable.h
@@ -81,12 +81,15 @@ gpointer g_initable_new (GType object_type,
const gchar *first_property_name,
...);
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
GLIB_DEPRECATED_IN_2_54_FOR(g_object_new_with_properties and g_initable_init)
gpointer g_initable_newv (GType object_type,
guint n_parameters,
GParameter *parameters,
GCancellable *cancellable,
GError **error);
+G_GNUC_END_IGNORE_DEPRECATIONS
+
GLIB_AVAILABLE_IN_ALL
GObject* g_initable_new_valist (GType object_type,
const gchar *first_property_name,
diff --git a/gio/gioenums.h b/gio/gioenums.h
index d3ada454a..22fe7005c 100644
--- a/gio/gioenums.h
+++ b/gio/gioenums.h
@@ -1628,7 +1628,7 @@ typedef enum {
G_TLS_REHANDSHAKE_NEVER,
G_TLS_REHANDSHAKE_SAFELY,
G_TLS_REHANDSHAKE_UNSAFELY
-} GTlsRehandshakeMode;
+} GTlsRehandshakeMode GLIB_DEPRECATED_TYPE_IN_2_60;
/**
* GTlsPasswordFlags:
diff --git a/gio/giomodule.c b/gio/giomodule.c
index ee1b0b6f4..9bb28985a 100644
--- a/gio/giomodule.c
+++ b/gio/giomodule.c
@@ -20,6 +20,10 @@
#include "config.h"
+/* For the #GDesktopAppInfoLookup macros; since macro deprecation is implemented
+ * in the preprocessor, we need to define this before including glib.h*/
+#define GLIB_DISABLE_DEPRECATION_WARNINGS
+
#include
#include "giomodule.h"
@@ -1087,9 +1091,7 @@ _g_io_modules_ensure_extension_points_registered (void)
#if defined(G_OS_UNIX) && !defined(HAVE_COCOA)
#if !GLIB_CHECK_VERSION (3, 0, 0)
ep = g_io_extension_point_register (G_DESKTOP_APP_INFO_LOOKUP_EXTENSION_POINT_NAME);
- G_GNUC_BEGIN_IGNORE_DEPRECATIONS
g_io_extension_point_set_required_type (ep, G_TYPE_DESKTOP_APP_INFO_LOOKUP);
- G_GNUC_END_IGNORE_DEPRECATIONS
#endif
#endif
diff --git a/gio/gtlsconnection.c b/gio/gtlsconnection.c
index 02a3098c1..3942f65e3 100644
--- a/gio/gtlsconnection.c
+++ b/gio/gtlsconnection.c
@@ -754,6 +754,7 @@ g_tls_connection_get_require_close_notify (GTlsConnection *conn)
* required for compatibility. Also, rehandshaking has been removed
* from the TLS protocol in TLS 1.3.
*/
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
void
g_tls_connection_set_rehandshake_mode (GTlsConnection *conn,
GTlsRehandshakeMode mode)
@@ -764,6 +765,7 @@ g_tls_connection_set_rehandshake_mode (GTlsConnection *conn,
"rehandshake-mode", mode,
NULL);
}
+G_GNUC_END_IGNORE_DEPRECATIONS
/**
* g_tls_connection_get_rehandshake_mode:
@@ -780,6 +782,7 @@ g_tls_connection_set_rehandshake_mode (GTlsConnection *conn,
* required for compatibility. Also, rehandshaking has been removed
* from the TLS protocol in TLS 1.3.
*/
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
GTlsRehandshakeMode
g_tls_connection_get_rehandshake_mode (GTlsConnection *conn)
{
@@ -792,6 +795,7 @@ g_tls_connection_get_rehandshake_mode (GTlsConnection *conn)
NULL);
return mode;
}
+G_GNUC_END_IGNORE_DEPRECATIONS
/**
* g_tls_connection_set_advertised_protocols:
diff --git a/gio/gtlsconnection.h b/gio/gtlsconnection.h
index 39ec3fa02..be38dcf5c 100644
--- a/gio/gtlsconnection.h
+++ b/gio/gtlsconnection.h
@@ -109,11 +109,13 @@ void g_tls_connection_set_require_close_notify (GTlsConnecti
GLIB_AVAILABLE_IN_ALL
gboolean g_tls_connection_get_require_close_notify (GTlsConnection *conn);
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
GLIB_DEPRECATED_IN_2_60
void g_tls_connection_set_rehandshake_mode (GTlsConnection *conn,
GTlsRehandshakeMode mode);
GLIB_DEPRECATED_IN_2_60
GTlsRehandshakeMode g_tls_connection_get_rehandshake_mode (GTlsConnection *conn);
+G_GNUC_END_IGNORE_DEPRECATIONS
GLIB_AVAILABLE_IN_2_60
void g_tls_connection_set_advertised_protocols (GTlsConnection *conn,
diff --git a/gio/gvolume.h b/gio/gvolume.h
index 6d8a814dc..e153b7c38 100644
--- a/gio/gvolume.h
+++ b/gio/gvolume.h
@@ -30,7 +30,6 @@
G_BEGIN_DECLS
-#ifndef G_DISABLE_DEPRECATED
/**
* G_VOLUME_IDENTIFIER_KIND_HAL_UDI:
*
@@ -38,8 +37,7 @@ G_BEGIN_DECLS
*
* Deprecated: 2.58: Do not use, HAL is deprecated.
*/
-#define G_VOLUME_IDENTIFIER_KIND_HAL_UDI "hal-udi"
-#endif /* G_DISABLE_DEPRECATED */
+#define G_VOLUME_IDENTIFIER_KIND_HAL_UDI "hal-udi" GLIB_DEPRECATED_MACRO_IN_2_58
/**
* G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE:
diff --git a/gio/inotify/meson.build b/gio/inotify/meson.build
index 8183f141e..9b0c7ab30 100644
--- a/gio/inotify/meson.build
+++ b/gio/inotify/meson.build
@@ -12,4 +12,4 @@ inotify_lib = static_library('inotify',
include_directories : [configinc, glibinc, gmoduleinc],
dependencies : [gioenumtypes_dep, libglib_dep, libgobject_dep],
pic : true,
- c_args : [ '-DG_DISABLE_DEPRECATED' ] + gio_c_args)
+ c_args : gio_c_args)
diff --git a/gio/kqueue/meson.build b/gio/kqueue/meson.build
index e5057c83d..d389b06f7 100644
--- a/gio/kqueue/meson.build
+++ b/gio/kqueue/meson.build
@@ -10,4 +10,4 @@ kqueue_lib = static_library('kqueue',
include_directories : [configinc, glibinc, gmoduleinc],
dependencies : [gioenumtypes_dep],
pic : true,
- c_args : [ '-DG_DISABLE_DEPRECATED' ] + gio_c_args)
+ c_args : gio_c_args)
diff --git a/gio/win32/meson.build b/gio/win32/meson.build
index f0fc307ba..8d589989b 100644
--- a/gio/win32/meson.build
+++ b/gio/win32/meson.build
@@ -12,4 +12,4 @@ giowin32_lib = static_library('giowin32',
include_directories : [configinc, glibinc, gioinc, gmoduleinc],
dependencies : [libintl, gioenumtypes_dep],
pic : true,
- c_args : [ '-DG_DISABLE_DEPRECATED' ] + gio_c_args)
+ c_args : gio_c_args)
diff --git a/glib/deprecated/gcache.c b/glib/deprecated/gcache.c
index 7056c13ac..179ad9e17 100644
--- a/glib/deprecated/gcache.c
+++ b/glib/deprecated/gcache.c
@@ -28,6 +28,9 @@
#include "config.h"
+/* we know we are deprecated here, no need for warnings */
+#define GLIB_DISABLE_DEPRECATION_WARNINGS
+
#include "gcache.h"
#include "gslice.h"
diff --git a/glib/deprecated/gcache.h b/glib/deprecated/gcache.h
index 2885697f9..e1c1f2cde 100644
--- a/glib/deprecated/gcache.h
+++ b/glib/deprecated/gcache.h
@@ -33,13 +33,13 @@
G_BEGIN_DECLS
-#ifndef G_DISABLE_DEPRECATED
+typedef struct _GCache GCache GLIB_DEPRECATED_TYPE_IN_2_26_FOR(GHashTable);
-typedef struct _GCache GCache;
+typedef gpointer (*GCacheNewFunc) (gpointer key) GLIB_DEPRECATED_TYPE_IN_2_26;
+typedef gpointer (*GCacheDupFunc) (gpointer value) GLIB_DEPRECATED_TYPE_IN_2_26;
+typedef void (*GCacheDestroyFunc) (gpointer value) GLIB_DEPRECATED_TYPE_IN_2_26;
-typedef gpointer (*GCacheNewFunc) (gpointer key);
-typedef gpointer (*GCacheDupFunc) (gpointer value);
-typedef void (*GCacheDestroyFunc) (gpointer value);
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
/* Caches
*/
@@ -68,7 +68,7 @@ void g_cache_value_foreach (GCache *cache,
GHFunc func,
gpointer user_data);
-#endif
+G_GNUC_END_IGNORE_DEPRECATIONS
G_END_DECLS
diff --git a/glib/deprecated/gmain.h b/glib/deprecated/gmain.h
index d14dd0ed3..2199328fd 100644
--- a/glib/deprecated/gmain.h
+++ b/glib/deprecated/gmain.h
@@ -33,8 +33,6 @@
G_BEGIN_DECLS
-#ifndef G_DISABLE_DEPRECATED
-
/* ============== Compat main loop stuff ================== */
/**
@@ -49,7 +47,7 @@ G_BEGIN_DECLS
*
* Deprecated: 2.2: Use g_main_loop_new() instead
*/
-#define g_main_new(is_running) g_main_loop_new (NULL, is_running)
+#define g_main_new(is_running) g_main_loop_new (NULL, is_running) GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_main_loop_new)
/**
* g_main_run:
@@ -59,7 +57,7 @@ G_BEGIN_DECLS
*
* Deprecated: 2.2: Use g_main_loop_run() instead
*/
-#define g_main_run(loop) g_main_loop_run(loop)
+#define g_main_run(loop) g_main_loop_run(loop) GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_main_loop_run)
/**
* g_main_quit:
@@ -70,7 +68,7 @@ G_BEGIN_DECLS
*
* Deprecated: 2.2: Use g_main_loop_quit() instead
*/
-#define g_main_quit(loop) g_main_loop_quit(loop)
+#define g_main_quit(loop) g_main_loop_quit(loop) GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_main_loop_quit)
/**
* g_main_destroy:
@@ -80,7 +78,7 @@ G_BEGIN_DECLS
*
* Deprecated: 2.2: Use g_main_loop_unref() instead
*/
-#define g_main_destroy(loop) g_main_loop_unref(loop)
+#define g_main_destroy(loop) g_main_loop_unref(loop) GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_main_loop_unref)
/**
* g_main_is_running:
@@ -92,7 +90,7 @@ G_BEGIN_DECLS
*
* Deprecated: 2.2: Use g_main_loop_is_running() instead
*/
-#define g_main_is_running(loop) g_main_loop_is_running(loop)
+#define g_main_is_running(loop) g_main_loop_is_running(loop) GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_main_loop_is_running)
/**
* g_main_iteration:
@@ -107,7 +105,7 @@ G_BEGIN_DECLS
*
* Deprecated: 2.2: Use g_main_context_iteration() instead.
*/
-#define g_main_iteration(may_block) g_main_context_iteration (NULL, may_block)
+#define g_main_iteration(may_block) g_main_context_iteration (NULL, may_block) GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_main_context_iteration)
/**
* g_main_pending:
@@ -119,7 +117,7 @@ G_BEGIN_DECLS
*
* Deprected: 2.2: Use g_main_context_pending() instead.
*/
-#define g_main_pending() g_main_context_pending (NULL)
+#define g_main_pending() g_main_context_pending (NULL) GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_main_context_pending)
/**
* g_main_set_poll_func:
@@ -130,9 +128,7 @@ G_BEGIN_DECLS
*
* Deprecated: 2.2: Use g_main_context_set_poll_func() again
*/
-#define g_main_set_poll_func(func) g_main_context_set_poll_func (NULL, func)
-
-#endif
+#define g_main_set_poll_func(func) g_main_context_set_poll_func (NULL, func) GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_main_context_set_poll_func)
G_END_DECLS
diff --git a/glib/deprecated/gthread.h b/glib/deprecated/gthread.h
index 9e1c2ff56..33b422240 100644
--- a/glib/deprecated/gthread.h
+++ b/glib/deprecated/gthread.h
@@ -33,7 +33,7 @@
G_BEGIN_DECLS
-#ifndef G_DISABLE_DEPRECATED
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
typedef enum
{
@@ -41,9 +41,7 @@ typedef enum
G_THREAD_PRIORITY_NORMAL,
G_THREAD_PRIORITY_HIGH,
G_THREAD_PRIORITY_URGENT
-} GThreadPriority;
-
-#endif
+} GThreadPriority GLIB_DEPRECATED_TYPE_IN_2_32;
struct _GThread
{
@@ -54,9 +52,7 @@ struct _GThread
GThreadPriority priority;
};
-#ifndef G_DISABLE_DEPRECATED
-
-typedef struct _GThreadFunctions GThreadFunctions;
+typedef struct _GThreadFunctions GThreadFunctions GLIB_DEPRECATED_TYPE_IN_2_32;
struct _GThreadFunctions
{
GMutex* (*mutex_new) (void);
@@ -93,7 +89,7 @@ struct _GThreadFunctions
void (*thread_self) (gpointer thread);
gboolean (*thread_equal) (gpointer thread1,
gpointer thread2);
-};
+} GLIB_DEPRECATED_TYPE_IN_2_32;
GLIB_VAR GThreadFunctions g_thread_functions_for_glib_use;
GLIB_VAR gboolean g_thread_use_default_impl;
@@ -128,8 +124,8 @@ void g_thread_foreach (GFunc thread_func,
#include
#endif
-#define g_static_mutex_get_mutex g_static_mutex_get_mutex_impl
-#define G_STATIC_MUTEX_INIT { NULL }
+#define g_static_mutex_get_mutex g_static_mutex_get_mutex_impl GLIB_DEPRECATED_MACRO_IN_2_32
+#define G_STATIC_MUTEX_INIT { NULL } GLIB_DEPRECATED_MACRO_IN_2_32_FOR(g_mutex_init)
typedef struct
{
GMutex *mutex;
@@ -137,14 +133,14 @@ typedef struct
/* only for ABI compatibility reasons */
pthread_mutex_t unused;
#endif
-} GStaticMutex;
+} GStaticMutex GLIB_DEPRECATED_TYPE_IN_2_32_FOR(GMutex);
#define g_static_mutex_lock(mutex) \
- g_mutex_lock (g_static_mutex_get_mutex (mutex))
+ g_mutex_lock (g_static_mutex_get_mutex (mutex)) GLIB_DEPRECATED_MACRO_IN_2_32_FOR(g_mutex_lock)
#define g_static_mutex_trylock(mutex) \
- g_mutex_trylock (g_static_mutex_get_mutex (mutex))
+ g_mutex_trylock (g_static_mutex_get_mutex (mutex)) GLIB_DEPRECATED_MACRO_IN_2_32_FOR(g_mutex_trylock)
#define g_static_mutex_unlock(mutex) \
- g_mutex_unlock (g_static_mutex_get_mutex (mutex))
+ g_mutex_unlock (g_static_mutex_get_mutex (mutex)) GLIB_DEPRECATED_MACRO_IN_2_32_FOR(g_mutex_unlock)
GLIB_DEPRECATED_IN_2_32_FOR(g_mutex_init)
void g_static_mutex_init (GStaticMutex *mutex);
@@ -153,7 +149,7 @@ void g_static_mutex_free (GStaticMutex *mutex);
GLIB_DEPRECATED_IN_2_32_FOR(GMutex)
GMutex *g_static_mutex_get_mutex_impl (GStaticMutex *mutex);
-typedef struct _GStaticRecMutex GStaticRecMutex;
+typedef struct _GStaticRecMutex GStaticRecMutex GLIB_DEPRECATED_TYPE_IN_2_32_FOR(GRecMutex);
struct _GStaticRecMutex
{
/*< private >*/
@@ -169,9 +165,9 @@ struct _GStaticRecMutex
#endif
gdouble dummy;
} unused;
-};
+} GLIB_DEPRECATED_TYPE_IN_2_32_FOR(GRecMutex);
-#define G_STATIC_REC_MUTEX_INIT { G_STATIC_MUTEX_INIT, 0, { 0 } }
+#define G_STATIC_REC_MUTEX_INIT { G_STATIC_MUTEX_INIT, 0, { 0 } } GLIB_DEPRECATED_MACRO_IN_2_32_FOR(g_rec_mutex_init)
GLIB_DEPRECATED_IN_2_32_FOR(g_rec_mutex_init)
void g_static_rec_mutex_init (GStaticRecMutex *mutex);
@@ -194,7 +190,7 @@ guint g_static_rec_mutex_unlock_full (GStaticRecMutex *mutex);
GLIB_DEPRECATED_IN_2_32_FOR(g_rec_mutex_free)
void g_static_rec_mutex_free (GStaticRecMutex *mutex);
-typedef struct _GStaticRWLock GStaticRWLock;
+typedef struct _GStaticRWLock GStaticRWLock GLIB_DEPRECATED_TYPE_IN_2_32_FOR(GRWLock);
struct _GStaticRWLock
{
/*< private >*/
@@ -205,9 +201,9 @@ struct _GStaticRWLock
gboolean have_writer;
guint want_to_read;
guint want_to_write;
-};
+} GLIB_DEPRECATED_TYPE_IN_2_32_FOR(GRWLock);
-#define G_STATIC_RW_LOCK_INIT { G_STATIC_MUTEX_INIT, NULL, NULL, 0, FALSE, 0, 0 }
+#define G_STATIC_RW_LOCK_INIT { G_STATIC_MUTEX_INIT, NULL, NULL, 0, FALSE, 0, 0 } GLIB_DEPRECATED_MACRO_IN_2_32_FOR(g_rw_lock_init)
GLIB_DEPRECATED_IN_2_32_FOR(g_rw_lock_init)
void g_static_rw_lock_init (GStaticRWLock *lock);
@@ -236,14 +232,14 @@ void g_static_rw_lock_free (GStaticRWLock *lock);
GLIB_DEPRECATED_IN_2_32
GPrivate * g_private_new (GDestroyNotify notify);
-typedef struct _GStaticPrivate GStaticPrivate;
+typedef struct _GStaticPrivate GStaticPrivate GLIB_DEPRECATED_TYPE_IN_2_32_FOR(GPrivate);
struct _GStaticPrivate
{
/*< private >*/
guint index;
-};
+} GLIB_DEPRECATED_TYPE_IN_2_32_FOR(GPrivate);
-#define G_STATIC_PRIVATE_INIT { 0 }
+#define G_STATIC_PRIVATE_INIT { 0 } GLIB_DEPRECATED_MACRO_IN_2_32_FOR(G_PRIVATE_INIT)
GLIB_DEPRECATED_IN_2_32
void g_static_private_init (GStaticPrivate *private_key);
@@ -271,7 +267,7 @@ gboolean g_thread_get_initialized (void);
GLIB_VAR gboolean g_threads_got_initialized;
-#define g_thread_supported() (1)
+#define g_thread_supported() (1) GLIB_DEPRECATED_MACRO_IN_2_32
GLIB_DEPRECATED_IN_2_32
GMutex * g_mutex_new (void);
@@ -286,7 +282,7 @@ gboolean g_cond_timed_wait (GCond *cond,
GMutex *mutex,
GTimeVal *timeval);
-#endif
+G_GNUC_END_IGNORE_DEPRECATIONS
G_END_DECLS
diff --git a/glib/docs.c b/glib/docs.c
index f68a1a8b7..60ca64c3c 100644
--- a/glib/docs.c
+++ b/glib/docs.c
@@ -1819,22 +1819,6 @@
* Returns: the offset of @member from the start of @struct_type
*/
-/**
- * G_CONST_RETURN:
- *
- * If %G_DISABLE_CONST_RETURNS is defined, this macro expands
- * to nothing. By default, the macro expands to const. The macro
- * can be used in place of const for functions that return a value
- * that should not be modified. The purpose of this macro is to allow
- * us to turn on const for returned constant strings by default, while
- * allowing programmers who find that annoying to turn it off. This macro
- * should only be used for return values and for "out" parameters, it
- * doesn't make sense for "in" parameters.
- *
- * Deprecated: 2.30: API providers should replace all existing uses with
- * const and API consumers should adjust their code accordingly
- */
-
/**
* G_N_ELEMENTS:
* @arr: the array
@@ -2139,24 +2123,6 @@
* of deprecated GLib APIs.
*/
-/**
- * G_GNUC_FUNCTION:
- *
- * Expands to "" on all modern compilers, and to __FUNCTION__ on gcc
- * version 2.x. Don't use it.
- *
- * Deprecated: 2.16: Use G_STRFUNC() instead
- */
-
-/**
- * G_GNUC_PRETTY_FUNCTION:
- *
- * Expands to "" on all modern compilers, and to __PRETTY_FUNCTION__
- * on gcc version 2.x. Don't use it.
- *
- * Deprecated: 2.16: Use G_STRFUNC() instead
- */
-
/**
* G_GNUC_INTERNAL:
*
diff --git a/glib/gdate.h b/glib/gdate.h
index 63feb3535..b7cd44e07 100644
--- a/glib/gdate.h
+++ b/glib/gdate.h
@@ -198,11 +198,9 @@ void g_date_set_time_t (GDate *date,
GLIB_AVAILABLE_IN_ALL
void g_date_set_time_val (GDate *date,
GTimeVal *timeval);
-#ifndef G_DISABLE_DEPRECATED
GLIB_DEPRECATED_FOR(g_date_set_time_t)
void g_date_set_time (GDate *date,
GTime time_);
-#endif
GLIB_AVAILABLE_IN_ALL
void g_date_set_month (GDate *date,
GDateMonth month);
@@ -290,21 +288,17 @@ gsize g_date_strftime (gchar *s,
const gchar *format,
const GDate *date);
-#ifndef G_DISABLE_DEPRECATED
-
-#define g_date_weekday g_date_get_weekday
-#define g_date_month g_date_get_month
-#define g_date_year g_date_get_year
-#define g_date_day g_date_get_day
-#define g_date_julian g_date_get_julian
-#define g_date_day_of_year g_date_get_day_of_year
-#define g_date_monday_week_of_year g_date_get_monday_week_of_year
-#define g_date_sunday_week_of_year g_date_get_sunday_week_of_year
-#define g_date_days_in_month g_date_get_days_in_month
-#define g_date_monday_weeks_in_year g_date_get_monday_weeks_in_year
-#define g_date_sunday_weeks_in_year g_date_get_sunday_weeks_in_year
-
-#endif /* G_DISABLE_DEPRECATED */
+#define g_date_weekday g_date_get_weekday GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_date_get_weekday)
+#define g_date_month g_date_get_month GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_date_get_month)
+#define g_date_year g_date_get_year GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_date_get_year)
+#define g_date_day g_date_get_day GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_date_get_day)
+#define g_date_julian g_date_get_julian GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_date_get_julian)
+#define g_date_day_of_year g_date_get_day_of_year GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_date_get_day_of_year)
+#define g_date_monday_week_of_year g_date_get_monday_week_of_year GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_date_get_monday_week_of_year)
+#define g_date_sunday_week_of_year g_date_get_sunday_week_of_year GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_date_get_sunday_week_of_year)
+#define g_date_days_in_month g_date_get_days_in_month GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_date_get_days_in_month)
+#define g_date_monday_weeks_in_year g_date_get_monday_weeks_in_year GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_date_get_monday_weeks_in_year)
+#define g_date_sunday_weeks_in_year g_date_get_sunday_weeks_in_year GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_date_get_sunday_weeks_in_year)
G_END_DECLS
diff --git a/glib/gfileutils.h b/glib/gfileutils.h
index bcaaa40ff..f60fad858 100644
--- a/glib/gfileutils.h
+++ b/glib/gfileutils.h
@@ -161,9 +161,7 @@ const gchar *g_path_skip_root (const gchar *file_name);
GLIB_DEPRECATED_FOR(g_path_get_basename)
const gchar *g_basename (const gchar *file_name);
-#ifndef G_DISABLE_DEPRECATED
-#define g_dirname g_path_get_dirname
-#endif
+#define g_dirname g_path_get_dirname GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_path_get_dirname)
GLIB_AVAILABLE_IN_ALL
gchar *g_get_current_dir (void);
diff --git a/glib/ghash.h b/glib/ghash.h
index 0256d5411..e9ce64505 100644
--- a/glib/ghash.h
+++ b/glib/ghash.h
@@ -148,10 +148,8 @@ GHashTable* g_hash_table_ref (GHashTable *hash_table);
GLIB_AVAILABLE_IN_ALL
void g_hash_table_unref (GHashTable *hash_table);
-#ifndef G_DISABLE_DEPRECATED
-#define g_hash_table_freeze(hash_table) ((void)0)
-#define g_hash_table_thaw(hash_table) ((void)0)
-#endif
+#define g_hash_table_freeze(hash_table) ((void)0) GLIB_DEPRECATED_MACRO_IN_2_26
+#define g_hash_table_thaw(hash_table) ((void)0) GLIB_DEPRECATED_MACRO_IN_2_26
/* Hash Functions
*/
diff --git a/glib/glib.h b/glib/glib.h
index 94a11fb62..5c21b6bf6 100644
--- a/glib/glib.h
+++ b/glib/glib.h
@@ -102,14 +102,12 @@
#include
#endif
-#ifndef G_DISABLE_DEPRECATED
#include
#include
#include
#include
#include
#include
-#endif /* G_DISABLE_DEPRECATED */
#include
diff --git a/glib/glibconfig.h.in b/glib/glibconfig.h.in
index 2bf6c43c1..7ef8c481d 100644
--- a/glib/glibconfig.h.in
+++ b/glib/glibconfig.h.in
@@ -108,11 +108,6 @@ typedef unsigned @glib_intptr_type_define@ guintptr;
#define G_GINTPTR_FORMAT @gintptr_format@
#define G_GUINTPTR_FORMAT @guintptr_format@
-#ifndef G_DISABLE_DEPRECATED
-#define g_ATEXIT(proc) (atexit (proc))
-#define g_memmove(dest,src,len) G_STMT_START { memmove ((dest), (src), (len)); } G_STMT_END
-#endif
-
#define GLIB_MAJOR_VERSION @GLIB_MAJOR_VERSION@
#define GLIB_MINOR_VERSION @GLIB_MINOR_VERSION@
#define GLIB_MICRO_VERSION @GLIB_MICRO_VERSION@
diff --git a/glib/gmacros.h b/glib/gmacros.h
index db5f0b087..629d14be8 100644
--- a/glib/gmacros.h
+++ b/glib/gmacros.h
@@ -96,17 +96,15 @@
* Deprecated: 2.48: Use "static inline" instead
*/
-#ifndef G_DISABLE_DEPRECATED
/* For historical reasons we need to continue to support those who
* define G_IMPLEMENT_INLINES to mean "don't implement this here".
*/
#ifdef G_IMPLEMENT_INLINES
-# define G_INLINE_FUNC extern
+# define G_INLINE_FUNC extern GLIB_DEPRECATED_MACRO_IN_2_48_FOR(static inline)
# undef G_CAN_INLINE
#else
-# define G_INLINE_FUNC static inline
+# define G_INLINE_FUNC static inline GLIB_DEPRECATED_MACRO_IN_2_48_FOR(static inline)
#endif /* G_IMPLEMENT_INLINES */
-#endif /* !G_DISABLE_DEPRECATED */
/* Provide macros to feature the GCC function attribute.
*/
@@ -689,19 +687,38 @@
#define G_GNUC_WARN_UNUSED_RESULT
#endif /* __GNUC__ */
-#ifndef G_DISABLE_DEPRECATED
+/**
+ * G_GNUC_FUNCTION:
+ *
+ * Expands to "" on all modern compilers, and to __FUNCTION__ on gcc
+ * version 2.x. Don't use it.
+ *
+ * Deprecated: 2.16: Use G_STRFUNC() instead
+ */
+
+/**
+ * G_GNUC_PRETTY_FUNCTION:
+ *
+ * Expands to "" on all modern compilers, and to __PRETTY_FUNCTION__
+ * on gcc version 2.x. Don't use it.
+ *
+ * Deprecated: 2.16: Use G_STRFUNC() instead
+ */
+
/* Wrap the gcc __PRETTY_FUNCTION__ and __FUNCTION__ variables with
* macros, so we can refer to them as strings unconditionally.
* usage not-recommended since gcc-3.0
+ *
+ * Mark them as deprecated since 2.26, since that’s when version macros were
+ * introduced.
*/
#if defined (__GNUC__) && (__GNUC__ < 3)
-#define G_GNUC_FUNCTION __FUNCTION__
-#define G_GNUC_PRETTY_FUNCTION __PRETTY_FUNCTION__
+#define G_GNUC_FUNCTION __FUNCTION__ GLIB_DEPRECATED_MACRO_IN_2_26_FOR(G_STRFUNC)
+#define G_GNUC_PRETTY_FUNCTION __PRETTY_FUNCTION__ GLIB_DEPRECATED_MACRO_IN_2_26_FOR(G_STRFUNC)
#else /* !__GNUC__ */
-#define G_GNUC_FUNCTION ""
-#define G_GNUC_PRETTY_FUNCTION ""
+#define G_GNUC_FUNCTION "" GLIB_DEPRECATED_MACRO_IN_2_26_FOR(G_STRFUNC)
+#define G_GNUC_PRETTY_FUNCTION "" GLIB_DEPRECATED_MACRO_IN_2_26_FOR(G_STRFUNC)
#endif /* !__GNUC__ */
-#endif /* !G_DISABLE_DEPRECATED */
#if g_macro__has_feature(attribute_analyzer_noreturn) && defined(__clang_analyzer__)
#define G_ANALYZER_ANALYZING 1
@@ -867,14 +884,26 @@
#define G_ALIGNOF(type) (G_STRUCT_OFFSET (struct { char a; type b; }, b))
#endif
-/* Deprecated -- do not use. */
-#ifndef G_DISABLE_DEPRECATED
+/**
+ * G_CONST_RETURN:
+ *
+ * If %G_DISABLE_CONST_RETURNS is defined, this macro expands
+ * to nothing. By default, the macro expands to const. The macro
+ * can be used in place of const for functions that return a value
+ * that should not be modified. The purpose of this macro is to allow
+ * us to turn on const for returned constant strings by default, while
+ * allowing programmers who find that annoying to turn it off. This macro
+ * should only be used for return values and for "out" parameters, it
+ * doesn't make sense for "in" parameters.
+ *
+ * Deprecated: 2.30: API providers should replace all existing uses with
+ * const and API consumers should adjust their code accordingly
+ */
#ifdef G_DISABLE_CONST_RETURNS
-#define G_CONST_RETURN
+#define G_CONST_RETURN GLIB_DEPRECATED_MACRO_IN_2_30_FOR(const)
#else
-#define G_CONST_RETURN const
+#define G_CONST_RETURN const GLIB_DEPRECATED_MACRO_IN_2_30_FOR(const)
#endif
-#endif /* !G_DISABLE_DEPRECATED */
/*
* The G_LIKELY and G_UNLIKELY macros let the programmer give hints to
@@ -929,7 +958,7 @@
#define _GLIB_EXTERN extern
#endif
-/* These macros are used to mark deprecated functions in GLib headers,
+/* These macros are used to mark deprecated symbols in GLib headers,
* and thus have to be exposed in installed headers. But please
* do *not* use them in other projects. Instead, use G_DEPRECATED
* or define your own wrappers around it.
@@ -945,6 +974,43 @@
#define GLIB_UNAVAILABLE(maj,min) G_UNAVAILABLE(maj,min) _GLIB_EXTERN
#endif
+#if !defined(GLIB_DISABLE_DEPRECATION_WARNINGS) && \
+ (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || \
+ __clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 4))
+#define _GLIB_GNUC_DO_PRAGMA(x) _Pragma(G_STRINGIFY (x))
+#define GLIB_DEPRECATED_MACRO _GLIB_GNUC_DO_PRAGMA(GCC warning "Deprecated pre-processor symbol")
+#define GLIB_DEPRECATED_MACRO_FOR(f) _GLIB_GNUC_DO_PRAGMA(GCC warning #f)
+#define GLIB_UNAVAILABLE_MACRO(maj,min) _GLIB_GNUC_DO_PRAGMA(GCC warning "Not available before " #maj "." #min)
+#else
+#define GLIB_DEPRECATED_MACRO
+#define GLIB_DEPRECATED_MACRO_FOR(f)
+#define GLIB_UNAVAILABLE_MACRO(maj,min)
+#endif
+
+#if !defined(GLIB_DISABLE_DEPRECATION_WARNINGS) && \
+ (__GNUC__ > 5 || (__GNUC__ == 5 && __GNUC_MINOR__ >= 2) || \
+ __clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 0))
+#define GLIB_DEPRECATED_ENUMERATOR G_DEPRECATED
+#define GLIB_DEPRECATED_ENUMERATOR_FOR(f) G_DEPRECATED_FOR(f)
+#define GLIB_UNAVAILABLE_ENUMERATOR(maj,min) G_UNAVAILABLE(maj,min)
+#else
+#define GLIB_DEPRECATED_ENUMERATOR
+#define GLIB_DEPRECATED_ENUMERATOR_FOR(f)
+#define GLIB_UNAVAILABLE_ENUMERATOR(maj,min)
+#endif
+
+#if !defined(GLIB_DISABLE_DEPRECATION_WARNINGS) && \
+ (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) || \
+ __clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 0))
+#define GLIB_DEPRECATED_TYPE G_DEPRECATED
+#define GLIB_DEPRECATED_TYPE_FOR(f) G_DEPRECATED_FOR(f)
+#define GLIB_UNAVAILABLE_TYPE(maj,min) G_UNAVAILABLE(maj,min)
+#else
+#define GLIB_DEPRECATED_TYPE
+#define GLIB_DEPRECATED_TYPE_FOR(f)
+#define GLIB_UNAVAILABLE_TYPE(maj,min)
+#endif
+
#ifndef __GI_SCANNER__
#ifdef __GNUC__
diff --git a/glib/gscanner.h b/glib/gscanner.h
index db0d9aaf9..d87b4533e 100644
--- a/glib/gscanner.h
+++ b/glib/gscanner.h
@@ -278,25 +278,21 @@ void g_scanner_warn (GScanner *scanner,
const gchar *format,
...) G_GNUC_PRINTF (2,3);
-#ifndef G_DISABLE_DEPRECATED
-
/* keep downward source compatibility */
#define g_scanner_add_symbol( scanner, symbol, value ) G_STMT_START { \
g_scanner_scope_add_symbol ((scanner), 0, (symbol), (value)); \
-} G_STMT_END
+} G_STMT_END GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_scanner_scope_add_symbol)
#define g_scanner_remove_symbol( scanner, symbol ) G_STMT_START { \
g_scanner_scope_remove_symbol ((scanner), 0, (symbol)); \
-} G_STMT_END
+} G_STMT_END GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_scanner_scope_remove_symbol)
#define g_scanner_foreach_symbol( scanner, func, data ) G_STMT_START { \
g_scanner_scope_foreach_symbol ((scanner), 0, (func), (data)); \
-} G_STMT_END
+} G_STMT_END GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_scanner_scope_foreach_symbol)
/* The following two functions are deprecated and will be removed in
* the next major release. They do no good. */
-#define g_scanner_freeze_symbol_table(scanner) ((void)0)
-#define g_scanner_thaw_symbol_table(scanner) ((void)0)
-
-#endif /* G_DISABLE_DEPRECATED */
+#define g_scanner_freeze_symbol_table(scanner) ((void)0) GLIB_DEPRECATED_MACRO_IN_2_26
+#define g_scanner_thaw_symbol_table(scanner) ((void)0) GLIB_DEPRECATED_MACRO_IN_2_26
G_END_DECLS
diff --git a/glib/gslice.c b/glib/gslice.c
index 0e1726138..7239bab3a 100644
--- a/glib/gslice.c
+++ b/glib/gslice.c
@@ -1397,7 +1397,9 @@ slab_allocator_free_chunk (gsize chunk_size,
*/
#if !(HAVE_POSIX_MEMALIGN || HAVE_MEMALIGN || HAVE_VALLOC)
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
static GTrashStack *compat_valloc_trash = NULL;
+G_GNUC_END_IGNORE_DEPRECATIONS
#endif
static gpointer
diff --git a/glib/gspawn.h b/glib/gspawn.h
index d6b0be7d0..240aae768 100644
--- a/glib/gspawn.h
+++ b/glib/gspawn.h
@@ -46,7 +46,7 @@ G_BEGIN_DECLS
* @G_SPAWN_ERROR_ACCES: execv() returned `EACCES`
* @G_SPAWN_ERROR_PERM: execv() returned `EPERM`
* @G_SPAWN_ERROR_TOO_BIG: execv() returned `E2BIG`
- * @G_SPAWN_ERROR_2BIG: deprecated alias for %G_SPAWN_ERROR_TOO_BIG
+ * @G_SPAWN_ERROR_2BIG: deprecated alias for %G_SPAWN_ERROR_TOO_BIG (deprecated since GLib 2.32)
* @G_SPAWN_ERROR_NOEXEC: execv() returned `ENOEXEC`
* @G_SPAWN_ERROR_NAMETOOLONG: execv() returned `ENAMETOOLONG`
* @G_SPAWN_ERROR_NOENT: execv() returned `ENOENT`
@@ -73,9 +73,7 @@ typedef enum
G_SPAWN_ERROR_ACCES, /* execv() returned EACCES */
G_SPAWN_ERROR_PERM, /* execv() returned EPERM */
G_SPAWN_ERROR_TOO_BIG,/* execv() returned E2BIG */
-#ifndef G_DISABLE_DEPRECATED
- G_SPAWN_ERROR_2BIG = G_SPAWN_ERROR_TOO_BIG,
-#endif
+ G_SPAWN_ERROR_2BIG GLIB_DEPRECATED_ENUMERATOR_IN_2_32_FOR(G_SPAWN_ERROR_TOO_BIG) = G_SPAWN_ERROR_TOO_BIG,
G_SPAWN_ERROR_NOEXEC, /* execv() returned ENOEXEC */
G_SPAWN_ERROR_NAMETOOLONG, /* "" "" ENAMETOOLONG */
G_SPAWN_ERROR_NOENT, /* "" "" ENOENT */
diff --git a/glib/gstring.h b/glib/gstring.h
index 77951b041..e1b2e7fca 100644
--- a/glib/gstring.h
+++ b/glib/gstring.h
@@ -179,10 +179,8 @@ GString *g_string_down (GString *string);
GLIB_DEPRECATED
GString *g_string_up (GString *string);
-#ifndef G_DISABLE_DEPRECATED
-#define g_string_sprintf g_string_printf
-#define g_string_sprintfa g_string_append_printf
-#endif
+#define g_string_sprintf g_string_printf GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_string_printf)
+#define g_string_sprintfa g_string_append_printf GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_string_append_printf)
G_END_DECLS
diff --git a/glib/gtestutils.c b/glib/gtestutils.c
index abdaaa607..ecef563b7 100644
--- a/glib/gtestutils.c
+++ b/glib/gtestutils.c
@@ -3268,6 +3268,7 @@ wait_for_child (GPid pid,
* and is not always reliable due to problems inherent in
* fork-without-exec. Use g_test_trap_subprocess() instead.
*/
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
gboolean
g_test_trap_fork (guint64 usec_timeout,
GTestTrapFlags test_trap_flags)
@@ -3330,6 +3331,7 @@ g_test_trap_fork (guint64 usec_timeout,
return FALSE;
#endif
}
+G_GNUC_END_IGNORE_DEPRECATIONS
/**
* g_test_trap_subprocess:
diff --git a/glib/gtestutils.h b/glib/gtestutils.h
index 7a0715c82..114d0554b 100644
--- a/glib/gtestutils.h
+++ b/glib/gtestutils.h
@@ -356,7 +356,7 @@ void g_test_queue_destroy (GDestroyNotify destroy_func,
* Test traps are guards around forked tests.
* These flags determine what traps to set.
*
- * Deprecated: #GTestTrapFlags is used only with g_test_trap_fork(),
+ * Deprecated: 2.38: #GTestTrapFlags is used only with g_test_trap_fork(),
* which is deprecated. g_test_trap_subprocess() uses
* #GTestSubprocessFlags.
*/
@@ -364,11 +364,13 @@ typedef enum {
G_TEST_TRAP_SILENCE_STDOUT = 1 << 7,
G_TEST_TRAP_SILENCE_STDERR = 1 << 8,
G_TEST_TRAP_INHERIT_STDIN = 1 << 9
-} GTestTrapFlags;
+} GTestTrapFlags GLIB_DEPRECATED_TYPE_IN_2_38_FOR(GTestSubprocessFlags);
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
GLIB_DEPRECATED_IN_2_38_FOR (g_test_trap_subprocess)
gboolean g_test_trap_fork (guint64 usec_timeout,
GTestTrapFlags test_trap_flags);
+G_GNUC_END_IGNORE_DEPRECATIONS
typedef enum {
G_TEST_SUBPROCESS_INHERIT_STDIN = 1 << 0,
diff --git a/glib/gtimezone.c b/glib/gtimezone.c
index f418401ee..970b4b1a5 100644
--- a/glib/gtimezone.c
+++ b/glib/gtimezone.c
@@ -850,7 +850,7 @@ find_relative_date (TimeZoneDate *buffer)
else /* M.W.D */
{
guint days;
- guint days_in_month = g_date_days_in_month (buffer->mon, buffer->year);
+ guint days_in_month = g_date_get_days_in_month (buffer->mon, buffer->year);
GDateWeekday first_wday;
g_date_set_dmy (&date, 1, buffer->mon, buffer->year);
diff --git a/glib/gtrashstack.c b/glib/gtrashstack.c
index 02599d632..8d5226840 100644
--- a/glib/gtrashstack.c
+++ b/glib/gtrashstack.c
@@ -24,6 +24,9 @@
#include "config.h"
+/* we know we are deprecated here, no need for warnings */
+#define GLIB_DISABLE_DEPRECATION_WARNINGS
+
#include "gtrashstack.h"
/**
diff --git a/glib/gtrashstack.h b/glib/gtrashstack.h
index 44b3c6c10..0730ec296 100644
--- a/glib/gtrashstack.h
+++ b/glib/gtrashstack.h
@@ -33,11 +33,13 @@
G_BEGIN_DECLS
-typedef struct _GTrashStack GTrashStack;
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+
+typedef struct _GTrashStack GTrashStack GLIB_DEPRECATED_TYPE_IN_2_48;
struct _GTrashStack
{
GTrashStack *next;
-};
+} GLIB_DEPRECATED_TYPE_IN_2_48;
GLIB_DEPRECATED_IN_2_48
void g_trash_stack_push (GTrashStack **stack_p,
@@ -49,6 +51,8 @@ gpointer g_trash_stack_peek (GTrashStack **stack_p);
GLIB_DEPRECATED_IN_2_48
guint g_trash_stack_height (GTrashStack **stack_p);
+G_GNUC_END_IGNORE_DEPRECATIONS
+
G_END_DECLS
#endif /* __G_TRASH_STACK_H_ */
diff --git a/glib/gunicode.h b/glib/gunicode.h
index 700a3f2d9..201af5ce8 100644
--- a/glib/gunicode.h
+++ b/glib/gunicode.h
@@ -154,9 +154,7 @@ typedef enum
*
* Deprecated: 2.30: Use %G_UNICODE_SPACING_MARK.
*/
-#ifndef G_DISABLE_DEPRECATED
-#define G_UNICODE_COMBINING_MARK G_UNICODE_SPACING_MARK
-#endif
+#define G_UNICODE_COMBINING_MARK G_UNICODE_SPACING_MARK GLIB_DEPRECATED_MACRO_IN_2_30_FOR(G_UNICODE_SPACING_MARK)
/**
* GUnicodeBreakType:
diff --git a/glib/gutils.c b/glib/gutils.c
index 9e2f0b0b7..87db6a1f3 100644
--- a/glib/gutils.c
+++ b/glib/gutils.c
@@ -218,6 +218,7 @@ _glib_get_dll_directory (void)
*
* Deprecated:2.32: It is best to avoid g_atexit().
*/
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
void
g_atexit (GVoidFunc func)
{
@@ -232,6 +233,7 @@ g_atexit (GVoidFunc func)
g_strerror (errsv));
}
}
+G_GNUC_END_IGNORE_DEPRECATIONS
/* Based on execvp() from GNU Libc.
* Some of this code is cut-and-pasted into gspawn.c
diff --git a/glib/gutils.h b/glib/gutils.h
index 070f9cff5..560a84e3a 100644
--- a/glib/gutils.h
+++ b/glib/gutils.h
@@ -194,7 +194,10 @@ gchar *g_format_size (guint64 size);
GLIB_DEPRECATED_IN_2_30_FOR(g_format_size)
gchar *g_format_size_for_display (goffset size);
-#ifndef G_DISABLE_DEPRECATED
+#define g_ATEXIT(proc) (atexit (proc)) GLIB_DEPRECATED_MACRO_IN_2_32
+#define g_memmove(dest,src,len) \
+ G_STMT_START { memmove ((dest), (src), (len)); } G_STMT_END GLIB_DEPRECATED_MACRO_IN_2_40_FOR(memmove)
+
/**
* GVoidFunc:
*
@@ -202,10 +205,13 @@ gchar *g_format_size_for_display (goffset size);
* and has no return value. It is used to specify the type
* function passed to g_atexit().
*/
-typedef void (*GVoidFunc) (void);
-#define ATEXIT(proc) g_ATEXIT(proc)
+typedef void (*GVoidFunc) (void) GLIB_DEPRECATED_TYPE_IN_2_32;
+#define ATEXIT(proc) g_ATEXIT(proc) GLIB_DEPRECATED_MACRO_IN_2_32
+
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
GLIB_DEPRECATED
void g_atexit (GVoidFunc func);
+G_GNUC_END_IGNORE_DEPRECATIONS
#ifdef G_OS_WIN32
/* It's a bad idea to wrap atexit() on Windows. If the GLib DLL calls
@@ -217,9 +223,7 @@ void g_atexit (GVoidFunc func);
#if (defined(__MINGW_H) && !defined(_STDLIB_H_)) || (defined(_MSC_VER) && !defined(_INC_STDLIB))
int atexit (void (*)(void));
#endif
-#define g_atexit(func) atexit(func)
-#endif
-
+#define g_atexit(func) atexit(func) GLIB_DEPRECATED_MACRO_IN_2_32
#endif
@@ -311,8 +315,6 @@ void g_abort (void) G_GNUC_NORETURN G_ANALYZER_NORETURN;
#endif
#endif
-#ifndef G_DISABLE_DEPRECATED
-
/*
* This macro is deprecated. This DllMain() is too complex. It is
* recommended to write an explicit minimal DLlMain() that just saves
@@ -331,7 +333,7 @@ void g_abort (void) G_GNUC_NORETURN G_ANALYZER_NORETURN;
*/
#ifndef G_PLATFORM_WIN32
-# define G_WIN32_DLLMAIN_FOR_DLL_NAME(static, dll_name)
+# define G_WIN32_DLLMAIN_FOR_DLL_NAME(static, dll_name) GLIB_DEPRECATED_MACRO_IN_2_26
#else
# define G_WIN32_DLLMAIN_FOR_DLL_NAME(static, dll_name) \
static char *dll_name; \
@@ -354,10 +356,7 @@ DllMain (HINSTANCE hinstDLL, \
} \
\
return TRUE; \
-}
-
-#endif /* !G_DISABLE_DEPRECATED */
-
+} GLIB_DEPRECATED_MACRO_IN_2_26
#endif /* G_PLATFORM_WIN32 */
G_END_DECLS
diff --git a/glib/gversionmacros.h b/glib/gversionmacros.h
index e66afdd91..ee91f6d5b 100644
--- a/glib/gversionmacros.h
+++ b/glib/gversionmacros.h
@@ -319,267 +319,605 @@
#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_26
# define GLIB_DEPRECATED_IN_2_26 GLIB_DEPRECATED
# define GLIB_DEPRECATED_IN_2_26_FOR(f) GLIB_DEPRECATED_FOR(f)
+# define GLIB_DEPRECATED_MACRO_IN_2_26 GLIB_DEPRECATED_MACRO
+# define GLIB_DEPRECATED_MACRO_IN_2_26_FOR(f) GLIB_DEPRECATED_MACRO_FOR(f)
+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_26 GLIB_DEPRECATED_ENUMERATOR
+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_26_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR(f)
+# define GLIB_DEPRECATED_TYPE_IN_2_26 GLIB_DEPRECATED_TYPE
+# define GLIB_DEPRECATED_TYPE_IN_2_26_FOR(f) GLIB_DEPRECATED_TYPE_FOR(f)
#else
# define GLIB_DEPRECATED_IN_2_26 _GLIB_EXTERN
# define GLIB_DEPRECATED_IN_2_26_FOR(f) _GLIB_EXTERN
+# define GLIB_DEPRECATED_MACRO_IN_2_26
+# define GLIB_DEPRECATED_MACRO_IN_2_26_FOR(f)
+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_26
+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_26_FOR(f)
+# define GLIB_DEPRECATED_TYPE_IN_2_26
+# define GLIB_DEPRECATED_TYPE_IN_2_26_FOR(f)
#endif
#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_26
# define GLIB_AVAILABLE_IN_2_26 GLIB_UNAVAILABLE(2, 26)
+# define GLIB_AVAILABLE_MACRO_IN_2_26 GLIB_UNAVAILABLE_MACRO(2, 26)
+# define GLIB_AVAILABLE_ENUMERATOR_IN_2_26 GLIB_UNAVAILABLE_ENUMERATOR(2, 26)
+# define GLIB_AVAILABLE_TYPE_IN_2_26 GLIB_UNAVAILABLE_TYPE(2, 26)
#else
# define GLIB_AVAILABLE_IN_2_26 _GLIB_EXTERN
+# define GLIB_AVAILABLE_MACRO_IN_2_26
+# define GLIB_AVAILABLE_ENUMERATOR_IN_2_26
+# define GLIB_AVAILABLE_TYPE_IN_2_26
#endif
#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_28
# define GLIB_DEPRECATED_IN_2_28 GLIB_DEPRECATED
# define GLIB_DEPRECATED_IN_2_28_FOR(f) GLIB_DEPRECATED_FOR(f)
+# define GLIB_DEPRECATED_MACRO_IN_2_28 GLIB_DEPRECATED_MACRO
+# define GLIB_DEPRECATED_MACRO_IN_2_28_FOR(f) GLIB_DEPRECATED_MACRO_FOR(f)
+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_28 GLIB_DEPRECATED_ENUMERATOR
+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_28_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR(f)
+# define GLIB_DEPRECATED_TYPE_IN_2_28 GLIB_DEPRECATED_TYPE
+# define GLIB_DEPRECATED_TYPE_IN_2_28_FOR(f) GLIB_DEPRECATED_TYPE_FOR(f)
#else
# define GLIB_DEPRECATED_IN_2_28 _GLIB_EXTERN
# define GLIB_DEPRECATED_IN_2_28_FOR(f) _GLIB_EXTERN
+# define GLIB_DEPRECATED_MACRO_IN_2_28
+# define GLIB_DEPRECATED_MACRO_IN_2_28_FOR(f)
+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_28
+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_28_FOR(f)
+# define GLIB_DEPRECATED_TYPE_IN_2_28
+# define GLIB_DEPRECATED_TYPE_IN_2_28_FOR(f)
#endif
#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_28
# define GLIB_AVAILABLE_IN_2_28 GLIB_UNAVAILABLE(2, 28)
+# define GLIB_AVAILABLE_MACRO_IN_2_28 GLIB_UNAVAILABLE_MACRO(2, 28)
+# define GLIB_AVAILABLE_ENUMERATOR_IN_2_28 GLIB_UNAVAILABLE_ENUMERATOR(2, 28)
+# define GLIB_AVAILABLE_TYPE_IN_2_28 GLIB_UNAVAILABLE_TYPE(2, 28)
#else
# define GLIB_AVAILABLE_IN_2_28 _GLIB_EXTERN
+# define GLIB_AVAILABLE_MACRO_IN_2_28
+# define GLIB_AVAILABLE_ENUMERATOR_IN_2_28
+# define GLIB_AVAILABLE_TYPE_IN_2_28
#endif
#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_30
# define GLIB_DEPRECATED_IN_2_30 GLIB_DEPRECATED
# define GLIB_DEPRECATED_IN_2_30_FOR(f) GLIB_DEPRECATED_FOR(f)
+# define GLIB_DEPRECATED_MACRO_IN_2_30 GLIB_DEPRECATED_MACRO
+# define GLIB_DEPRECATED_MACRO_IN_2_30_FOR(f) GLIB_DEPRECATED_MACRO_FOR(f)
+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_30 GLIB_DEPRECATED_ENUMERATOR
+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_30_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR(f)
+# define GLIB_DEPRECATED_TYPE_IN_2_30 GLIB_DEPRECATED_TYPE
+# define GLIB_DEPRECATED_TYPE_IN_2_30_FOR(f) GLIB_DEPRECATED_TYPE_FOR(f)
#else
# define GLIB_DEPRECATED_IN_2_30 _GLIB_EXTERN
# define GLIB_DEPRECATED_IN_2_30_FOR(f) _GLIB_EXTERN
+# define GLIB_DEPRECATED_MACRO_IN_2_30
+# define GLIB_DEPRECATED_MACRO_IN_2_30_FOR(f)
+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_30
+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_30_FOR(f)
+# define GLIB_DEPRECATED_TYPE_IN_2_30
+# define GLIB_DEPRECATED_TYPE_IN_2_30_FOR(f)
#endif
#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_30
# define GLIB_AVAILABLE_IN_2_30 GLIB_UNAVAILABLE(2, 30)
+# define GLIB_AVAILABLE_MACRO_IN_2_30 GLIB_UNAVAILABLE_MACRO(2, 30)
+# define GLIB_AVAILABLE_ENUMERATOR_IN_2_30 GLIB_UNAVAILABLE_ENUMERATOR(2, 30)
+# define GLIB_AVAILABLE_TYPE_IN_2_30 GLIB_UNAVAILABLE_TYPE(2, 30)
#else
# define GLIB_AVAILABLE_IN_2_30 _GLIB_EXTERN
+# define GLIB_AVAILABLE_MACRO_IN_2_30
+# define GLIB_AVAILABLE_ENUMERATOR_IN_2_30
+# define GLIB_AVAILABLE_TYPE_IN_2_30
#endif
#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_32
# define GLIB_DEPRECATED_IN_2_32 GLIB_DEPRECATED
# define GLIB_DEPRECATED_IN_2_32_FOR(f) GLIB_DEPRECATED_FOR(f)
+# define GLIB_DEPRECATED_MACRO_IN_2_32 GLIB_DEPRECATED_MACRO
+# define GLIB_DEPRECATED_MACRO_IN_2_32_FOR(f) GLIB_DEPRECATED_MACRO_FOR(f)
+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_32 GLIB_DEPRECATED_ENUMERATOR
+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_32_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR(f)
+# define GLIB_DEPRECATED_TYPE_IN_2_32 GLIB_DEPRECATED_TYPE
+# define GLIB_DEPRECATED_TYPE_IN_2_32_FOR(f) GLIB_DEPRECATED_TYPE_FOR(f)
#else
# define GLIB_DEPRECATED_IN_2_32 _GLIB_EXTERN
# define GLIB_DEPRECATED_IN_2_32_FOR(f) _GLIB_EXTERN
+# define GLIB_DEPRECATED_MACRO_IN_2_32
+# define GLIB_DEPRECATED_MACRO_IN_2_32_FOR(f)
+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_32
+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_32_FOR(f)
+# define GLIB_DEPRECATED_TYPE_IN_2_32
+# define GLIB_DEPRECATED_TYPE_IN_2_32_FOR(f)
+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_32
+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_32_FOR(f)
+# define GLIB_DEPRECATED_TYPE_IN_2_32
+# define GLIB_DEPRECATED_TYPE_IN_2_32_FOR(f)
#endif
#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_32
# define GLIB_AVAILABLE_IN_2_32 GLIB_UNAVAILABLE(2, 32)
+# define GLIB_AVAILABLE_MACRO_IN_2_32 GLIB_UNAVAILABLE_MACRO(2, 32)
+# define GLIB_AVAILABLE_ENUMERATOR_IN_2_32 GLIB_UNAVAILABLE_ENUMERATOR(2, 32)
+# define GLIB_AVAILABLE_TYPE_IN_2_32 GLIB_UNAVAILABLE_TYPE(2, 32)
#else
# define GLIB_AVAILABLE_IN_2_32 _GLIB_EXTERN
+# define GLIB_AVAILABLE_MACRO_IN_2_32
+# define GLIB_AVAILABLE_ENUMERATOR_IN_2_32
+# define GLIB_AVAILABLE_TYPE_IN_2_32
#endif
#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_34
# define GLIB_DEPRECATED_IN_2_34 GLIB_DEPRECATED
# define GLIB_DEPRECATED_IN_2_34_FOR(f) GLIB_DEPRECATED_FOR(f)
+# define GLIB_DEPRECATED_MACRO_IN_2_34 GLIB_DEPRECATED_MACRO
+# define GLIB_DEPRECATED_MACRO_IN_2_34_FOR(f) GLIB_DEPRECATED_MACRO_FOR(f)
+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_34 GLIB_DEPRECATED_ENUMERATOR
+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_34_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR(f)
+# define GLIB_DEPRECATED_TYPE_IN_2_34 GLIB_DEPRECATED_TYPE
+# define GLIB_DEPRECATED_TYPE_IN_2_34_FOR(f) GLIB_DEPRECATED_TYPE_FOR(f)
#else
# define GLIB_DEPRECATED_IN_2_34 _GLIB_EXTERN
# define GLIB_DEPRECATED_IN_2_34_FOR(f) _GLIB_EXTERN
+# define GLIB_DEPRECATED_MACRO_IN_2_34
+# define GLIB_DEPRECATED_MACRO_IN_2_34_FOR(f)
+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_34
+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_34_FOR(f)
+# define GLIB_DEPRECATED_TYPE_IN_2_34
+# define GLIB_DEPRECATED_TYPE_IN_2_34_FOR(f)
#endif
#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_34
# define GLIB_AVAILABLE_IN_2_34 GLIB_UNAVAILABLE(2, 34)
+# define GLIB_AVAILABLE_MACRO_IN_2_34 GLIB_UNAVAILABLE_MACRO(2, 34)
+# define GLIB_AVAILABLE_ENUMERATOR_IN_2_34 GLIB_UNAVAILABLE_ENUMERATOR(2, 34)
+# define GLIB_AVAILABLE_TYPE_IN_2_34 GLIB_UNAVAILABLE_TYPE(2, 34)
#else
# define GLIB_AVAILABLE_IN_2_34 _GLIB_EXTERN
+# define GLIB_AVAILABLE_MACRO_IN_2_34
+# define GLIB_AVAILABLE_ENUMERATOR_IN_2_34
+# define GLIB_AVAILABLE_TYPE_IN_2_34
#endif
#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_36
# define GLIB_DEPRECATED_IN_2_36 GLIB_DEPRECATED
# define GLIB_DEPRECATED_IN_2_36_FOR(f) GLIB_DEPRECATED_FOR(f)
+# define GLIB_DEPRECATED_MACRO_IN_2_36 GLIB_DEPRECATED_MACRO
+# define GLIB_DEPRECATED_MACRO_IN_2_36_FOR(f) GLIB_DEPRECATED_MACRO_FOR(f)
+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_36 GLIB_DEPRECATED_ENUMERATOR
+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_36_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR(f)
+# define GLIB_DEPRECATED_TYPE_IN_2_36 GLIB_DEPRECATED_TYPE
+# define GLIB_DEPRECATED_TYPE_IN_2_36_FOR(f) GLIB_DEPRECATED_TYPE_FOR(f)
#else
# define GLIB_DEPRECATED_IN_2_36 _GLIB_EXTERN
# define GLIB_DEPRECATED_IN_2_36_FOR(f) _GLIB_EXTERN
+# define GLIB_DEPRECATED_MACRO_IN_2_36
+# define GLIB_DEPRECATED_MACRO_IN_2_36_FOR(f)
+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_36
+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_36_FOR(f)
+# define GLIB_DEPRECATED_TYPE_IN_2_36
+# define GLIB_DEPRECATED_TYPE_IN_2_36_FOR(f)
#endif
#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_36
# define GLIB_AVAILABLE_IN_2_36 GLIB_UNAVAILABLE(2, 36)
+# define GLIB_AVAILABLE_MACRO_IN_2_36 GLIB_UNAVAILABLE_MACRO(2, 36)
+# define GLIB_AVAILABLE_ENUMERATOR_IN_2_36 GLIB_UNAVAILABLE_ENUMERATOR(2, 36)
+# define GLIB_AVAILABLE_TYPE_IN_2_36 GLIB_UNAVAILABLE_TYPE(2, 36)
#else
# define GLIB_AVAILABLE_IN_2_36 _GLIB_EXTERN
+# define GLIB_AVAILABLE_MACRO_IN_2_36
+# define GLIB_AVAILABLE_ENUMERATOR_IN_2_36
+# define GLIB_AVAILABLE_TYPE_IN_2_36
#endif
#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_38
# define GLIB_DEPRECATED_IN_2_38 GLIB_DEPRECATED
# define GLIB_DEPRECATED_IN_2_38_FOR(f) GLIB_DEPRECATED_FOR(f)
+# define GLIB_DEPRECATED_MACRO_IN_2_38 GLIB_DEPRECATED_MACRO
+# define GLIB_DEPRECATED_MACRO_IN_2_38_FOR(f) GLIB_DEPRECATED_MACRO_FOR(f)
+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_38 GLIB_DEPRECATED_ENUMERATOR
+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_38_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR(f)
+# define GLIB_DEPRECATED_TYPE_IN_2_38 GLIB_DEPRECATED_TYPE
+# define GLIB_DEPRECATED_TYPE_IN_2_38_FOR(f) GLIB_DEPRECATED_TYPE_FOR(f)
#else
# define GLIB_DEPRECATED_IN_2_38 _GLIB_EXTERN
# define GLIB_DEPRECATED_IN_2_38_FOR(f) _GLIB_EXTERN
+# define GLIB_DEPRECATED_MACRO_IN_2_38
+# define GLIB_DEPRECATED_MACRO_IN_2_38_FOR(f)
+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_38
+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_38_FOR(f)
+# define GLIB_DEPRECATED_TYPE_IN_2_38
+# define GLIB_DEPRECATED_TYPE_IN_2_38_FOR(f)
#endif
#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
# define GLIB_AVAILABLE_IN_2_38 GLIB_UNAVAILABLE(2, 38)
+# define GLIB_AVAILABLE_MACRO_IN_2_38 GLIB_UNAVAILABLE_MACRO(2, 38)
+# define GLIB_AVAILABLE_ENUMERATOR_IN_2_38 GLIB_UNAVAILABLE_ENUMERATOR(2, 38)
+# define GLIB_AVAILABLE_TYPE_IN_2_38 GLIB_UNAVAILABLE_TYPE(2, 38)
#else
# define GLIB_AVAILABLE_IN_2_38 _GLIB_EXTERN
+# define GLIB_AVAILABLE_MACRO_IN_2_38
+# define GLIB_AVAILABLE_ENUMERATOR_IN_2_38
+# define GLIB_AVAILABLE_TYPE_IN_2_38
#endif
#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_40
# define GLIB_DEPRECATED_IN_2_40 GLIB_DEPRECATED
# define GLIB_DEPRECATED_IN_2_40_FOR(f) GLIB_DEPRECATED_FOR(f)
+# define GLIB_DEPRECATED_MACRO_IN_2_40 GLIB_DEPRECATED_MACRO
+# define GLIB_DEPRECATED_MACRO_IN_2_40_FOR(f) GLIB_DEPRECATED_MACRO_FOR(f)
+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_40 GLIB_DEPRECATED_ENUMERATOR
+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_40_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR(f)
+# define GLIB_DEPRECATED_TYPE_IN_2_40 GLIB_DEPRECATED_TYPE
+# define GLIB_DEPRECATED_TYPE_IN_2_40_FOR(f) GLIB_DEPRECATED_TYPE_FOR(f)
#else
# define GLIB_DEPRECATED_IN_2_40 _GLIB_EXTERN
# define GLIB_DEPRECATED_IN_2_40_FOR(f) _GLIB_EXTERN
+# define GLIB_DEPRECATED_MACRO_IN_2_40
+# define GLIB_DEPRECATED_MACRO_IN_2_40_FOR(f)
+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_40
+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_40_FOR(f)
+# define GLIB_DEPRECATED_TYPE_IN_2_40
+# define GLIB_DEPRECATED_TYPE_IN_2_40_FOR(f)
#endif
#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_40
# define GLIB_AVAILABLE_IN_2_40 GLIB_UNAVAILABLE(2, 40)
+# define GLIB_AVAILABLE_MACRO_IN_2_40 GLIB_UNAVAILABLE_MACRO(2, 40)
+# define GLIB_AVAILABLE_ENUMERATOR_IN_2_40 GLIB_UNAVAILABLE_ENUMERATOR(2, 40)
+# define GLIB_AVAILABLE_TYPE_IN_2_40 GLIB_UNAVAILABLE_TYPE(2, 40)
#else
# define GLIB_AVAILABLE_IN_2_40 _GLIB_EXTERN
+# define GLIB_AVAILABLE_MACRO_IN_2_40
+# define GLIB_AVAILABLE_ENUMERATOR_IN_2_40
+# define GLIB_AVAILABLE_TYPE_IN_2_40
#endif
#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_42
# define GLIB_DEPRECATED_IN_2_42 GLIB_DEPRECATED
# define GLIB_DEPRECATED_IN_2_42_FOR(f) GLIB_DEPRECATED_FOR(f)
+# define GLIB_DEPRECATED_MACRO_IN_2_42 GLIB_DEPRECATED_MACRO
+# define GLIB_DEPRECATED_MACRO_IN_2_42_FOR(f) GLIB_DEPRECATED_MACRO_FOR(f)
#else
# define GLIB_DEPRECATED_IN_2_42 _GLIB_EXTERN
# define GLIB_DEPRECATED_IN_2_42_FOR(f) _GLIB_EXTERN
+# define GLIB_DEPRECATED_MACRO_IN_2_42
+# define GLIB_DEPRECATED_MACRO_IN_2_42_FOR(f)
+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_42
+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_42_FOR(f)
+# define GLIB_DEPRECATED_TYPE_IN_2_42
+# define GLIB_DEPRECATED_TYPE_IN_2_42_FOR(f)
#endif
#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_42
# define GLIB_AVAILABLE_IN_2_42 GLIB_UNAVAILABLE(2, 42)
+# define GLIB_AVAILABLE_MACRO_IN_2_42 GLIB_UNAVAILABLE_MACRO(2, 42)
+# define GLIB_AVAILABLE_ENUMERATOR_IN_2_42 GLIB_UNAVAILABLE_ENUMERATOR(2, 42)
+# define GLIB_AVAILABLE_TYPE_IN_2_42 GLIB_UNAVAILABLE_TYPE(2, 42)
#else
# define GLIB_AVAILABLE_IN_2_42 _GLIB_EXTERN
+# define GLIB_AVAILABLE_MACRO_IN_2_42
+# define GLIB_AVAILABLE_ENUMERATOR_IN_2_42
+# define GLIB_AVAILABLE_TYPE_IN_2_42
#endif
#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_44
# define GLIB_DEPRECATED_IN_2_44 GLIB_DEPRECATED
# define GLIB_DEPRECATED_IN_2_44_FOR(f) GLIB_DEPRECATED_FOR(f)
+# define GLIB_DEPRECATED_MACRO_IN_2_44 GLIB_DEPRECATED_MACRO
+# define GLIB_DEPRECATED_MACRO_IN_2_44_FOR(f) GLIB_DEPRECATED_MACRO_FOR(f)
+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_44 GLIB_DEPRECATED_ENUMERATOR
+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_44_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR(f)
+# define GLIB_DEPRECATED_TYPE_IN_2_44 GLIB_DEPRECATED_TYPE
+# define GLIB_DEPRECATED_TYPE_IN_2_44_FOR(f) GLIB_DEPRECATED_TYPE_FOR(f)
#else
# define GLIB_DEPRECATED_IN_2_44 _GLIB_EXTERN
# define GLIB_DEPRECATED_IN_2_44_FOR(f) _GLIB_EXTERN
+# define GLIB_DEPRECATED_MACRO_IN_2_44
+# define GLIB_DEPRECATED_MACRO_IN_2_44_FOR(f)
+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_44
+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_44_FOR(f)
+# define GLIB_DEPRECATED_TYPE_IN_2_44
+# define GLIB_DEPRECATED_TYPE_IN_2_44_FOR(f)
#endif
#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_44
# define GLIB_AVAILABLE_IN_2_44 GLIB_UNAVAILABLE(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_TYPE_IN_2_44 GLIB_UNAVAILABLE_TYPE(2, 44)
#else
# define GLIB_AVAILABLE_IN_2_44 _GLIB_EXTERN
+# define GLIB_AVAILABLE_MACRO_IN_2_44
+# define GLIB_AVAILABLE_ENUMERATOR_IN_2_44
+# define GLIB_AVAILABLE_TYPE_IN_2_44
#endif
#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_46
# define GLIB_DEPRECATED_IN_2_46 GLIB_DEPRECATED
# define GLIB_DEPRECATED_IN_2_46_FOR(f) GLIB_DEPRECATED_FOR(f)
+# define GLIB_DEPRECATED_MACRO_IN_2_46 GLIB_DEPRECATED_MACRO
+# define GLIB_DEPRECATED_MACRO_IN_2_46_FOR(f) GLIB_DEPRECATED_MACRO_FOR(f)
#else
# define GLIB_DEPRECATED_IN_2_46 _GLIB_EXTERN
# define GLIB_DEPRECATED_IN_2_46_FOR(f) _GLIB_EXTERN
+# define GLIB_DEPRECATED_MACRO_IN_2_46
+# define GLIB_DEPRECATED_MACRO_IN_2_46_FOR(f)
+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_46
+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_46_FOR(f)
+# define GLIB_DEPRECATED_TYPE_IN_2_46
+# define GLIB_DEPRECATED_TYPE_IN_2_46_FOR(f)
#endif
#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_46
# define GLIB_AVAILABLE_IN_2_46 GLIB_UNAVAILABLE(2, 46)
+# define GLIB_AVAILABLE_MACRO_IN_2_46 GLIB_UNAVAILABLE_MACRO(2, 46)
+# define GLIB_AVAILABLE_ENUMERATOR_IN_2_46 GLIB_UNAVAILABLE_ENUMERATOR(2, 46)
+# define GLIB_AVAILABLE_TYPE_IN_2_46 GLIB_UNAVAILABLE_TYPE(2, 46)
#else
# define GLIB_AVAILABLE_IN_2_46 _GLIB_EXTERN
+# define GLIB_AVAILABLE_MACRO_IN_2_46
+# define GLIB_AVAILABLE_ENUMERATOR_IN_2_46
+# define GLIB_AVAILABLE_TYPE_IN_2_46
#endif
#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_48
# define GLIB_DEPRECATED_IN_2_48 GLIB_DEPRECATED
# define GLIB_DEPRECATED_IN_2_48_FOR(f) GLIB_DEPRECATED_FOR(f)
+# define GLIB_DEPRECATED_MACRO_IN_2_48 GLIB_DEPRECATED_MACRO
+# define GLIB_DEPRECATED_MACRO_IN_2_48_FOR(f) GLIB_DEPRECATED_MACRO_FOR(f)
+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_48 GLIB_DEPRECATED_ENUMERATOR
+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_48_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR(f)
+# define GLIB_DEPRECATED_TYPE_IN_2_48 GLIB_DEPRECATED_TYPE
+# define GLIB_DEPRECATED_TYPE_IN_2_48_FOR(f) GLIB_DEPRECATED_TYPE_FOR(f)
#else
# define GLIB_DEPRECATED_IN_2_48 _GLIB_EXTERN
# define GLIB_DEPRECATED_IN_2_48_FOR(f) _GLIB_EXTERN
+# define GLIB_DEPRECATED_MACRO_IN_2_48
+# define GLIB_DEPRECATED_MACRO_IN_2_48_FOR(f)
+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_48
+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_48_FOR(f)
+# define GLIB_DEPRECATED_TYPE_IN_2_48
+# define GLIB_DEPRECATED_TYPE_IN_2_48_FOR(f)
#endif
#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_48
# define GLIB_AVAILABLE_IN_2_48 GLIB_UNAVAILABLE(2, 48)
+# define GLIB_AVAILABLE_MACRO_IN_2_48 GLIB_UNAVAILABLE_MACRO(2, 48)
+# define GLIB_AVAILABLE_ENUMERATOR_IN_2_48 GLIB_UNAVAILABLE_ENUMERATOR(2, 48)
+# define GLIB_AVAILABLE_TYPE_IN_2_48 GLIB_UNAVAILABLE_TYPE(2, 48)
#else
# define GLIB_AVAILABLE_IN_2_48 _GLIB_EXTERN
+# define GLIB_AVAILABLE_MACRO_IN_2_48
+# define GLIB_AVAILABLE_ENUMERATOR_IN_2_48
+# define GLIB_AVAILABLE_TYPE_IN_2_48
#endif
#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_50
# define GLIB_DEPRECATED_IN_2_50 GLIB_DEPRECATED
# define GLIB_DEPRECATED_IN_2_50_FOR(f) GLIB_DEPRECATED_FOR(f)
+# define GLIB_DEPRECATED_MACRO_IN_2_50 GLIB_DEPRECATED_MACRO
+# define GLIB_DEPRECATED_MACRO_IN_2_50_FOR(f) GLIB_DEPRECATED_MACRO_FOR(f)
+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_50 GLIB_DEPRECATED_ENUMERATOR
+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_50_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR(f)
+# define GLIB_DEPRECATED_TYPE_IN_2_50 GLIB_DEPRECATED_TYPE
+# define GLIB_DEPRECATED_TYPE_IN_2_50_FOR(f) GLIB_DEPRECATED_TYPE_FOR(f)
#else
# define GLIB_DEPRECATED_IN_2_50 _GLIB_EXTERN
# define GLIB_DEPRECATED_IN_2_50_FOR(f) _GLIB_EXTERN
+# define GLIB_DEPRECATED_MACRO_IN_2_50
+# define GLIB_DEPRECATED_MACRO_IN_2_50_FOR(f)
+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_50
+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_50_FOR(f)
+# define GLIB_DEPRECATED_TYPE_IN_2_50
+# define GLIB_DEPRECATED_TYPE_IN_2_50_FOR(f)
#endif
#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_50
# define GLIB_AVAILABLE_IN_2_50 GLIB_UNAVAILABLE(2, 50)
+# define GLIB_AVAILABLE_MACRO_IN_2_50 GLIB_UNAVAILABLE_MACRO(2, 50)
+# define GLIB_AVAILABLE_ENUMERATOR_IN_2_50 GLIB_UNAVAILABLE_ENUMERATOR(2, 50)
+# define GLIB_AVAILABLE_TYPE_IN_2_50 GLIB_UNAVAILABLE_TYPE(2, 50)
#else
# define GLIB_AVAILABLE_IN_2_50 _GLIB_EXTERN
+# define GLIB_AVAILABLE_MACRO_IN_2_50
+# define GLIB_AVAILABLE_ENUMERATOR_IN_2_50
+# define GLIB_AVAILABLE_TYPE_IN_2_50
#endif
#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_52
# define GLIB_DEPRECATED_IN_2_52 GLIB_DEPRECATED
# define GLIB_DEPRECATED_IN_2_52_FOR(f) GLIB_DEPRECATED_FOR(f)
+# define GLIB_DEPRECATED_MACRO_IN_2_52 GLIB_DEPRECATED_MACRO
+# define GLIB_DEPRECATED_MACRO_IN_2_52_FOR(f) GLIB_DEPRECATED_MACRO_FOR(f)
+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_52 GLIB_DEPRECATED_ENUMERATOR
+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_52_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR(f)
+# define GLIB_DEPRECATED_TYPE_IN_2_52 GLIB_DEPRECATED_TYPE
+# define GLIB_DEPRECATED_TYPE_IN_2_52_FOR(f) GLIB_DEPRECATED_TYPE_FOR(f)
#else
# define GLIB_DEPRECATED_IN_2_52 _GLIB_EXTERN
# define GLIB_DEPRECATED_IN_2_52_FOR(f) _GLIB_EXTERN
+# define GLIB_DEPRECATED_MACRO_IN_2_52
+# define GLIB_DEPRECATED_MACRO_IN_2_52_FOR(f)
+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_52
+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_52_FOR(f)
+# define GLIB_DEPRECATED_TYPE_IN_2_52
+# define GLIB_DEPRECATED_TYPE_IN_2_52_FOR(f)
#endif
#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_52
# define GLIB_AVAILABLE_IN_2_52 GLIB_UNAVAILABLE(2, 52)
+# define GLIB_AVAILABLE_MACRO_IN_2_52 GLIB_UNAVAILABLE_MACRO(2, 52)
+# define GLIB_AVAILABLE_ENUMERATOR_IN_2_52 GLIB_UNAVAILABLE_ENUMERATOR(2, 52)
+# define GLIB_AVAILABLE_TYPE_IN_2_52 GLIB_UNAVAILABLE_TYPE(2, 52)
#else
# define GLIB_AVAILABLE_IN_2_52 _GLIB_EXTERN
+# define GLIB_AVAILABLE_MACRO_IN_2_52
+# define GLIB_AVAILABLE_ENUMERATOR_IN_2_52
+# define GLIB_AVAILABLE_TYPE_IN_2_52
#endif
#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_54
# define GLIB_DEPRECATED_IN_2_54 GLIB_DEPRECATED
# define GLIB_DEPRECATED_IN_2_54_FOR(f) GLIB_DEPRECATED_FOR(f)
+# define GLIB_DEPRECATED_MACRO_IN_2_54 GLIB_DEPRECATED_MACRO
+# define GLIB_DEPRECATED_MACRO_IN_2_54_FOR(f) GLIB_DEPRECATED_MACRO_FOR(f)
+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_54 GLIB_DEPRECATED_ENUMERATOR
+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_54_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR(f)
+# define GLIB_DEPRECATED_TYPE_IN_2_54 GLIB_DEPRECATED_TYPE
+# define GLIB_DEPRECATED_TYPE_IN_2_54_FOR(f) GLIB_DEPRECATED_TYPE_FOR(f)
#else
# define GLIB_DEPRECATED_IN_2_54 _GLIB_EXTERN
# define GLIB_DEPRECATED_IN_2_54_FOR(f) _GLIB_EXTERN
+# define GLIB_DEPRECATED_MACRO_IN_2_54
+# define GLIB_DEPRECATED_MACRO_IN_2_54_FOR(f)
+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_54
+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_54_FOR(f)
+# define GLIB_DEPRECATED_TYPE_IN_2_54
+# define GLIB_DEPRECATED_TYPE_IN_2_54_FOR(f)
#endif
#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_54
# define GLIB_AVAILABLE_IN_2_54 GLIB_UNAVAILABLE(2, 54)
+# define GLIB_AVAILABLE_MACRO_IN_2_54 GLIB_UNAVAILABLE_MACRO(2, 54)
+# define GLIB_AVAILABLE_ENUMERATOR_IN_2_54 GLIB_UNAVAILABLE_ENUMERATOR(2, 54)
+# define GLIB_AVAILABLE_TYPE_IN_2_54 GLIB_UNAVAILABLE_TYPE(2, 54)
#else
# define GLIB_AVAILABLE_IN_2_54 _GLIB_EXTERN
+# define GLIB_AVAILABLE_MACRO_IN_2_54
+# define GLIB_AVAILABLE_ENUMERATOR_IN_2_54
+# define GLIB_AVAILABLE_TYPE_IN_2_54
#endif
#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_56
# define GLIB_DEPRECATED_IN_2_56 GLIB_DEPRECATED
# define GLIB_DEPRECATED_IN_2_56_FOR(f) GLIB_DEPRECATED_FOR(f)
+# define GLIB_DEPRECATED_MACRO_IN_2_56 GLIB_DEPRECATED_MACRO
+# define GLIB_DEPRECATED_MACRO_IN_2_56_FOR(f) GLIB_DEPRECATED_MACRO_FOR(f)
+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_56 GLIB_DEPRECATED_ENUMERATOR
+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_56_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR(f)
+# define GLIB_DEPRECATED_TYPE_IN_2_56 GLIB_DEPRECATED_TYPE
+# define GLIB_DEPRECATED_TYPE_IN_2_56_FOR(f) GLIB_DEPRECATED_TYPE_FOR(f)
#else
# define GLIB_DEPRECATED_IN_2_56 _GLIB_EXTERN
# define GLIB_DEPRECATED_IN_2_56_FOR(f) _GLIB_EXTERN
+# define GLIB_DEPRECATED_MACRO_IN_2_56
+# define GLIB_DEPRECATED_MACRO_IN_2_56_FOR(f)
+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_56
+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_56_FOR(f)
+# define GLIB_DEPRECATED_TYPE_IN_2_56
+# define GLIB_DEPRECATED_TYPE_IN_2_56_FOR(f)
#endif
#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_56
# define GLIB_AVAILABLE_IN_2_56 GLIB_UNAVAILABLE(2, 56)
+# define GLIB_AVAILABLE_MACRO_IN_2_56 GLIB_UNAVAILABLE_MACRO(2, 56)
+# define GLIB_AVAILABLE_ENUMERATOR_IN_2_56 GLIB_UNAVAILABLE_ENUMERATOR(2, 56)
+# define GLIB_AVAILABLE_TYPE_IN_2_56 GLIB_UNAVAILABLE_TYPE(2, 56)
#else
# define GLIB_AVAILABLE_IN_2_56 _GLIB_EXTERN
+# define GLIB_AVAILABLE_MACRO_IN_2_56
+# define GLIB_AVAILABLE_ENUMERATOR_IN_2_56
+# define GLIB_AVAILABLE_TYPE_IN_2_56
#endif
#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_58
# define GLIB_DEPRECATED_IN_2_58 GLIB_DEPRECATED
# define GLIB_DEPRECATED_IN_2_58_FOR(f) GLIB_DEPRECATED_FOR(f)
+# define GLIB_DEPRECATED_MACRO_IN_2_58 GLIB_DEPRECATED_MACRO
+# define GLIB_DEPRECATED_MACRO_IN_2_58_FOR(f) GLIB_DEPRECATED_MACRO_FOR(f)
+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_58 GLIB_DEPRECATED_ENUMERATOR
+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_58_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR(f)
+# define GLIB_DEPRECATED_TYPE_IN_2_58 GLIB_DEPRECATED_TYPE
+# define GLIB_DEPRECATED_TYPE_IN_2_58_FOR(f) GLIB_DEPRECATED_TYPE_FOR(f)
#else
# define GLIB_DEPRECATED_IN_2_58 _GLIB_EXTERN
# define GLIB_DEPRECATED_IN_2_58_FOR(f) _GLIB_EXTERN
+# define GLIB_DEPRECATED_MACRO_IN_2_58
+# define GLIB_DEPRECATED_MACRO_IN_2_58_FOR(f)
+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_58
+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_58_FOR(f)
+# define GLIB_DEPRECATED_TYPE_IN_2_58
+# define GLIB_DEPRECATED_TYPE_IN_2_58_FOR(f)
#endif
#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_58
# define GLIB_AVAILABLE_IN_2_58 GLIB_UNAVAILABLE(2, 58)
+# define GLIB_AVAILABLE_MACRO_IN_2_58 GLIB_UNAVAILABLE_MACRO(2, 58)
+# define GLIB_AVAILABLE_ENUMERATOR_IN_2_58 GLIB_UNAVAILABLE_ENUMERATOR(2, 58)
+# define GLIB_AVAILABLE_TYPE_IN_2_58 GLIB_UNAVAILABLE_TYPE(2, 58)
#else
# define GLIB_AVAILABLE_IN_2_58 _GLIB_EXTERN
+# define GLIB_AVAILABLE_MACRO_IN_2_58
+# define GLIB_AVAILABLE_ENUMERATOR_IN_2_58
+# define GLIB_AVAILABLE_TYPE_IN_2_58
#endif
#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_60
# define GLIB_DEPRECATED_IN_2_60 GLIB_DEPRECATED
# define GLIB_DEPRECATED_IN_2_60_FOR(f) GLIB_DEPRECATED_FOR(f)
+# define GLIB_DEPRECATED_MACRO_IN_2_60 GLIB_DEPRECATED_MACRO
+# define GLIB_DEPRECATED_MACRO_IN_2_60_FOR(f) GLIB_DEPRECATED_MACRO_FOR(f)
+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_60 GLIB_DEPRECATED_ENUMERATOR
+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_60_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR(f)
+# define GLIB_DEPRECATED_TYPE_IN_2_60 GLIB_DEPRECATED_TYPE
+# define GLIB_DEPRECATED_TYPE_IN_2_60_FOR(f) GLIB_DEPRECATED_TYPE_FOR(f)
#else
# define GLIB_DEPRECATED_IN_2_60 _GLIB_EXTERN
# define GLIB_DEPRECATED_IN_2_60_FOR(f) _GLIB_EXTERN
+# define GLIB_DEPRECATED_MACRO_IN_2_60
+# define GLIB_DEPRECATED_MACRO_IN_2_60_FOR(f)
+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_60
+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_60_FOR(f)
+# define GLIB_DEPRECATED_TYPE_IN_2_60
+# define GLIB_DEPRECATED_TYPE_IN_2_60_FOR(f)
#endif
#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_60
# define GLIB_AVAILABLE_IN_2_60 GLIB_UNAVAILABLE(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_TYPE_IN_2_60 GLIB_UNAVAILABLE_TYPE(2, 60)
#else
# define GLIB_AVAILABLE_IN_2_60 _GLIB_EXTERN
+# define GLIB_AVAILABLE_MACRO_IN_2_60
+# define GLIB_AVAILABLE_ENUMERATOR_IN_2_60
+# define GLIB_AVAILABLE_TYPE_IN_2_60
#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)
+# define GLIB_DEPRECATED_MACRO_IN_2_62 GLIB_DEPRECATED_MACRO
+# define GLIB_DEPRECATED_MACRO_IN_2_62_FOR(f) GLIB_DEPRECATED_MACRO_FOR(f)
+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_62 GLIB_DEPRECATED_ENUMERATOR
+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_62_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR(f)
+# define GLIB_DEPRECATED_TYPE_IN_2_62 GLIB_DEPRECATED_TYPE
+# define GLIB_DEPRECATED_TYPE_IN_2_62_FOR(f) GLIB_DEPRECATED_TYPE_FOR(f)
#else
# define GLIB_DEPRECATED_IN_2_62 _GLIB_EXTERN
# define GLIB_DEPRECATED_IN_2_62_FOR(f) _GLIB_EXTERN
+# define GLIB_DEPRECATED_MACRO_IN_2_62
+# define GLIB_DEPRECATED_MACRO_IN_2_62_FOR(f)
+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_62
+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_62_FOR(f)
+# define GLIB_DEPRECATED_TYPE_IN_2_62
+# define GLIB_DEPRECATED_TYPE_IN_2_62_FOR(f)
#endif
#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_62
# define GLIB_AVAILABLE_IN_2_62 GLIB_UNAVAILABLE(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_TYPE_IN_2_62 GLIB_UNAVAILABLE_TYPE(2, 62)
#else
# define GLIB_AVAILABLE_IN_2_62 _GLIB_EXTERN
+# define GLIB_AVAILABLE_MACRO_IN_2_62
+# define GLIB_AVAILABLE_ENUMERATOR_IN_2_62
+# define GLIB_AVAILABLE_TYPE_IN_2_62
#endif
#endif /* __G_VERSION_MACROS_H__ */
diff --git a/glib/tests/unicode.c b/glib/tests/unicode.c
index 3858b7732..50c94edbe 100644
--- a/glib/tests/unicode.c
+++ b/glib/tests/unicode.c
@@ -64,7 +64,7 @@ test_unichar_character_type (void)
{ G_UNICODE_OTHER_LETTER, 0x3400 },
{ G_UNICODE_TITLECASE_LETTER, 0x01C5 },
{ G_UNICODE_UPPERCASE_LETTER, 0xFF21 },
- { G_UNICODE_COMBINING_MARK, 0x0903 },
+ { G_UNICODE_SPACING_MARK, 0x0903 },
{ G_UNICODE_ENCLOSING_MARK, 0x20DD },
{ G_UNICODE_NON_SPACING_MARK, 0xA806 },
{ G_UNICODE_DECIMAL_NUMBER, 0xFF10 },
diff --git a/gmodule/meson.build b/gmodule/meson.build
index e4a6a1c81..a7a2a5c87 100644
--- a/gmodule/meson.build
+++ b/gmodule/meson.build
@@ -103,7 +103,7 @@ libgmodule = library('gmodule-2.0',
install : true,
include_directories : [configinc, gmoduleinc],
dependencies : [libdl_dep, libglib_dep],
- c_args : ['-DG_LOG_DOMAIN="GModule"', '-DG_DISABLE_DEPRECATED'] + glib_hidden_visibility_args,
+ c_args : ['-DG_LOG_DOMAIN="GModule"'] + glib_hidden_visibility_args,
link_args : [glib_link_flags],
)
diff --git a/gobject/gobject.c b/gobject/gobject.c
index 2d017fd34..39cfe6718 100644
--- a/gobject/gobject.c
+++ b/gobject/gobject.c
@@ -2017,6 +2017,7 @@ g_object_new_with_properties (GType object_type,
* Deprecated: 2.54: Use g_object_new_with_properties() instead.
* deprecated. See #GParameter for more information.
*/
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
gpointer
g_object_newv (GType object_type,
guint n_parameters,
@@ -2068,6 +2069,7 @@ g_object_newv (GType object_type,
return object;
}
+G_GNUC_END_IGNORE_DEPRECATIONS
/**
* g_object_new_valist: (skip)
diff --git a/gobject/gobject.h b/gobject/gobject.h
index b5648f137..5f5c2a944 100644
--- a/gobject/gobject.h
+++ b/gobject/gobject.h
@@ -424,10 +424,14 @@ GObject* g_object_new_with_properties (GType object_type,
guint n_properties,
const char *names[],
const GValue values[]);
+
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
GLIB_DEPRECATED_IN_2_54_FOR(g_object_new_with_properties)
gpointer g_object_newv (GType object_type,
guint n_parameters,
GParameter *parameters);
+G_GNUC_END_IGNORE_DEPRECATIONS
+
GLIB_AVAILABLE_IN_ALL
GObject* g_object_new_valist (GType object_type,
const gchar *first_property_name,
diff --git a/gobject/gparam.h b/gobject/gparam.h
index 535b98035..33f95f0c5 100644
--- a/gobject/gparam.h
+++ b/gobject/gparam.h
@@ -156,9 +156,7 @@ typedef enum
G_PARAM_CONSTRUCT_ONLY = 1 << 3,
G_PARAM_LAX_VALIDATION = 1 << 4,
G_PARAM_STATIC_NAME = 1 << 5,
-#ifndef G_DISABLE_DEPRECATED
- G_PARAM_PRIVATE = G_PARAM_STATIC_NAME,
-#endif
+ G_PARAM_PRIVATE GLIB_DEPRECATED_ENUMERATOR_IN_2_26 = G_PARAM_STATIC_NAME,
G_PARAM_STATIC_NICK = 1 << 6,
G_PARAM_STATIC_BLURB = 1 << 7,
/* User defined flags go here */
@@ -193,7 +191,7 @@ typedef enum
/* --- typedefs & structures --- */
typedef struct _GParamSpec GParamSpec;
typedef struct _GParamSpecClass GParamSpecClass;
-typedef struct _GParameter GParameter;
+typedef struct _GParameter GParameter GLIB_DEPRECATED_TYPE_IN_2_54;
typedef struct _GParamSpecPool GParamSpecPool;
/**
* GParamSpec: (ref-func g_param_spec_ref_sink) (unref-func g_param_spec_uref) (set-value-func g_value_set_param) (get-value-func g_value_get_param)
@@ -274,7 +272,7 @@ struct _GParameter /* auxiliary structure for _setv() variants */
{
const gchar *name;
GValue value;
-};
+} GLIB_DEPRECATED_TYPE_IN_2_54;
/* --- prototypes --- */
diff --git a/gobject/gparamspecs.h b/gobject/gparamspecs.h
index 26045a368..0309f9bb3 100644
--- a/gobject/gparamspecs.h
+++ b/gobject/gparamspecs.h
@@ -452,7 +452,7 @@ G_BEGIN_DECLS
*
* Deprecated: 2.32: Use #GArray instead of #GValueArray
*/
-#define G_TYPE_PARAM_VALUE_ARRAY (g_param_spec_types[18])
+#define G_TYPE_PARAM_VALUE_ARRAY (g_param_spec_types[18]) GLIB_DEPRECATED_MACRO_IN_2_32
/**
* G_IS_PARAM_SPEC_VALUE_ARRAY:
* @pspec: a valid #GParamSpec instance
@@ -463,7 +463,7 @@ G_BEGIN_DECLS
*
* Deprecated: 2.32: Use #GArray instead of #GValueArray
*/
-#define G_IS_PARAM_SPEC_VALUE_ARRAY(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_VALUE_ARRAY))
+#define G_IS_PARAM_SPEC_VALUE_ARRAY(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_VALUE_ARRAY)) GLIB_DEPRECATED_MACRO_IN_2_32
/**
* G_PARAM_SPEC_VALUE_ARRAY:
* @pspec: a valid #GParamSpec instance
@@ -472,7 +472,7 @@ G_BEGIN_DECLS
*
* Deprecated: 2.32: Use #GArray instead of #GValueArray
*/
-#define G_PARAM_SPEC_VALUE_ARRAY(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_VALUE_ARRAY, GParamSpecValueArray))
+#define G_PARAM_SPEC_VALUE_ARRAY(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_VALUE_ARRAY, GParamSpecValueArray)) GLIB_DEPRECATED_MACRO_IN_2_32
/**
* G_TYPE_PARAM_OBJECT:
diff --git a/gobject/gtype-private.h b/gobject/gtype-private.h
index 5f2f13b47..230dba03a 100644
--- a/gobject/gtype-private.h
+++ b/gobject/gtype-private.h
@@ -44,7 +44,9 @@ G_STMT_START { \
G_BEGIN_DECLS
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
extern GTypeDebugFlags _g_type_debug_flags;
+G_GNUC_END_IGNORE_DEPRECATIONS
typedef struct _GRealClosure GRealClosure;
struct _GRealClosure
diff --git a/gobject/gtype.c b/gobject/gtype.c
index 67a1eda8b..425c6195d 100644
--- a/gobject/gtype.c
+++ b/gobject/gtype.c
@@ -380,7 +380,10 @@ static GQuark static_quark_type_flags = 0;
static GQuark static_quark_iface_holder = 0;
static GQuark static_quark_dependants_array = 0;
static guint type_registration_serial = 0;
+
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
GTypeDebugFlags _g_type_debug_flags = 0;
+G_GNUC_END_IGNORE_DEPRECATIONS
/* --- type nodes --- */
static GHashTable *static_type_nodes_ht = NULL;
@@ -4332,6 +4335,7 @@ _g_type_boxed_init (GType type,
*
* Deprecated: 2.36: the type system is now initialised automatically
*/
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
void
g_type_init_with_debug_flags (GTypeDebugFlags debug_flags)
{
@@ -4340,6 +4344,7 @@ g_type_init_with_debug_flags (GTypeDebugFlags debug_flags)
if (debug_flags)
g_message ("g_type_init_with_debug_flags() is no longer supported. Use the GOBJECT_DEBUG environment variable.");
}
+G_GNUC_END_IGNORE_DEPRECATIONS
/**
* g_type_init:
diff --git a/gobject/gtype.h b/gobject/gtype.h
index a3a07c6a3..e646bf9d3 100644
--- a/gobject/gtype.h
+++ b/gobject/gtype.h
@@ -638,7 +638,7 @@ struct _GTypeQuery
* `your_type_get_instance_private()` function instead
* Returns: (not nullable): a pointer to the private data structure
*/
-#define G_TYPE_INSTANCE_GET_PRIVATE(instance, g_type, c_type) ((c_type*) g_type_instance_get_private ((GTypeInstance*) (instance), (g_type)))
+#define G_TYPE_INSTANCE_GET_PRIVATE(instance, g_type, c_type) ((c_type*) g_type_instance_get_private ((GTypeInstance*) (instance), (g_type))) GLIB_DEPRECATED_MACRO_IN_2_58_FOR(G_ADD_PRIVATE)
/**
* G_TYPE_CLASS_GET_PRIVATE:
@@ -680,14 +680,17 @@ typedef enum /*< skip >*/
G_TYPE_DEBUG_SIGNALS = 1 << 1,
G_TYPE_DEBUG_INSTANCE_COUNT = 1 << 2,
G_TYPE_DEBUG_MASK = 0x07
-} GTypeDebugFlags;
+} GTypeDebugFlags GLIB_DEPRECATED_TYPE_IN_2_36;
/* --- prototypes --- */
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
GLIB_DEPRECATED_IN_2_36
void g_type_init (void);
GLIB_DEPRECATED_IN_2_36
void g_type_init_with_debug_flags (GTypeDebugFlags debug_flags);
+G_GNUC_END_IGNORE_DEPRECATIONS
+
GLIB_AVAILABLE_IN_ALL
const gchar * g_type_name (GType type);
GLIB_AVAILABLE_IN_ALL
diff --git a/gobject/gvaluearray.h b/gobject/gvaluearray.h
index d8b6bb55c..dbc6be765 100644
--- a/gobject/gvaluearray.h
+++ b/gobject/gvaluearray.h
@@ -35,7 +35,7 @@ G_BEGIN_DECLS
*
* Deprecated: 2.32: Use #GArray instead of #GValueArray
*/
-#define G_TYPE_VALUE_ARRAY (g_value_array_get_type ())
+#define G_TYPE_VALUE_ARRAY (g_value_array_get_type ()) GLIB_DEPRECATED_MACRO_IN_2_32_FOR(G_TYPE_ARRAY)
/* --- typedefs & structs --- */
typedef struct _GValueArray GValueArray;
diff --git a/gobject/tests/private.c b/gobject/tests/private.c
index 678222190..ee8fd8f45 100644
--- a/gobject/tests/private.c
+++ b/gobject/tests/private.c
@@ -1,3 +1,6 @@
+/* We are testing some deprecated APIs here */
+#define GLIB_DISABLE_DEPRECATION_WARNINGS
+
#include
typedef struct {
diff --git a/tests/asyncqueue-test.c b/tests/asyncqueue-test.c
index 0cf67b21b..2dd8563c7 100644
--- a/tests/asyncqueue-test.c
+++ b/tests/asyncqueue-test.c
@@ -1,6 +1,5 @@
#undef G_DISABLE_ASSERT
#undef G_LOG_DOMAIN
-#undef G_DISABLE_DEPRECATED
#include
#include
diff --git a/tests/testglib.c b/tests/testglib.c
index 687fadd5b..372ddae2c 100644
--- a/tests/testglib.c
+++ b/tests/testglib.c
@@ -1169,10 +1169,11 @@ hash_table_tests (void)
g_hash_table_destroy (hash_table);
}
-#ifndef G_DISABLE_DEPRECATED
static void
relation_test (void)
{
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+
GRelation *relation = g_relation_new (2);
GTuples *tuples;
gint data [1024];
@@ -1241,8 +1242,9 @@ relation_test (void)
g_relation_destroy (relation);
relation = NULL;
+
+ G_GNUC_END_IGNORE_DEPRECATIONS
}
-#endif
static void
gstring_tests (void)
@@ -1637,10 +1639,11 @@ various_string_tests (void)
/* g_debug (argv[0]); */
}
-#ifndef G_DISABLE_DEPRECATED
static void
test_mem_chunks (void)
{
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+
GMemChunk *mem_chunk = g_mem_chunk_new ("test mem chunk", 50, 100, G_ALLOC_AND_FREE);
gchar *mem[10000];
guint i;
@@ -1655,8 +1658,9 @@ test_mem_chunks (void)
g_mem_chunk_free (mem_chunk, mem[i]);
g_mem_chunk_destroy (mem_chunk);
+
+ G_GNUC_END_IGNORE_DEPRECATIONS
}
-#endif
int
main (int argc,
@@ -1674,15 +1678,11 @@ main (int argc,
g_test_add_func ("/testglib/GTree", binary_tree_test);
g_test_add_func ("/testglib/Arrays", test_arrays);
g_test_add_func ("/testglib/GHashTable", hash_table_tests);
-#ifndef G_DISABLE_DEPRECATED
g_test_add_func ("/testglib/Relation (deprecated)", relation_test);
-#endif
g_test_add_func ("/testglib/File Paths", test_paths);
g_test_add_func ("/testglib/File Functions", test_file_functions);
g_test_add_func ("/testglib/Parse Debug Strings", test_g_parse_debug_string);
-#ifndef G_DISABLE_DEPRECATED
g_test_add_func ("/testglib/GMemChunk (deprecated)", test_mem_chunks);
-#endif
g_test_add_func ("/testglib/Warnings & Errors", log_warning_error_tests);
g_test_add_func ("/testglib/Timers (slow)", timer_tests);