summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Withnall <withnall@endlessm.com>2019-05-27 19:50:09 +0100
committerPhilip Withnall <withnall@endlessm.com>2019-05-30 10:39:11 +0100
commit40ff4759774516b7dff3b07303a98fc1626b2d0e (patch)
tree7e1343d20b04163ba009b29311cb22f10cb193d9
parent1741fc2c6eb8e11f4e786ccc5c19c0da327630a5 (diff)
downloadglib-40ff4759774516b7dff3b07303a98fc1626b2d0e.tar.gz
Annotate various types and macros as deprecated
These have all been documented as deprecated for a long time, but we’ve never had a way to programmatically mark them as deprecated. Do that now. This is based on the list of deprecations from the reverted commit 80fcb1bc2. Signed-off-by: Philip Withnall <withnall@endlessm.com> Fixes: #638
-rw-r--r--gio/gasyncinitable.c4
-rw-r--r--gio/gasyncinitable.h4
-rw-r--r--gio/gdesktopappinfo.c4
-rw-r--r--gio/gdtlsconnection.c4
-rw-r--r--gio/gdtlsconnection.h2
-rw-r--r--gio/ginitable.c4
-rw-r--r--gio/ginitable.h3
-rw-r--r--gio/gioenums.h2
-rw-r--r--gio/gtlsconnection.c4
-rw-r--r--gio/gtlsconnection.h2
-rw-r--r--glib/gslice.c2
-rw-r--r--glib/gtestutils.c2
-rw-r--r--glib/gtestutils.h6
-rw-r--r--glib/gtrashstack.c3
-rw-r--r--glib/gtrashstack.h8
-rw-r--r--gobject/gobject.c2
-rw-r--r--gobject/gobject.h4
-rw-r--r--gobject/gparam.h4
-rw-r--r--gobject/gparamspecs.h6
-rw-r--r--gobject/gtype-private.h2
-rw-r--r--gobject/gtype.c5
-rw-r--r--gobject/gtype.h7
-rw-r--r--gobject/gvaluearray.h2
-rw-r--r--gobject/tests/private.c3
24 files changed, 72 insertions, 17 deletions
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 ba2469af8..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 <errno.h>
#include <string.h>
#include <unistd.h>
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/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/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/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/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/gobject/gobject.c b/gobject/gobject.c
index c95311b3e..e243664fd 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 97a90dbe4..33f95f0c5 100644
--- a/gobject/gparam.h
+++ b/gobject/gparam.h
@@ -191,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)
@@ -272,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 <glib-object.h>
typedef struct {