[glib] Revert "headers: Add various missing G_DISABLE_DEPRECATED guards"



commit e5ba5845a1ee1151585d58db33e769566e119d99
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Fri Mar 15 18:30:16 2019 +0000

    Revert "headers: Add various missing G_DISABLE_DEPRECATED guards"
    
    This reverts commit 80fcb1bc26edca17a996ee293153f8e07cfc9198.
    
    G_DISABLE_DEPRECATED should never be used by anybody, least of all by
    GLib. We have deprecation annotations for the compiler, these days, and
    they are much better suited than a macro that makes symbols appear and
    disappear. The fact that gtk-doc doesn't understand the deprecation
    annotations is a limitation of gtk-doc, and it's gtk-doc that ought to be
    fixed.
    
    Commit 80fcb1bc broke GStreamer, which disables old API that was
    deprecated before the introduction of the deprecation annotations, but
    still uses newly deprecated one, and relies on the deprecation
    annotations to do their thing. It also broke libsoup, as it uses
    GValueArray in its own API.

 gio/gdtlsconnection.h                | 2 --
 gio/gioenums.h                       | 2 --
 gio/gsimpleasyncresult.h             | 3 ---
 gio/gtlsconnection.h                 | 2 --
 glib/deprecated/gthread-deprecated.c | 7 +------
 glib/gmacros.h                       | 4 ++--
 glib/gmem.h                          | 3 ---
 glib/gtestutils.h                    | 2 --
 glib/gtrashstack.h                   | 4 ----
 gobject/gparam.h                     | 4 +---
 gobject/gparamspecs.h                | 8 --------
 gobject/gtype.h                      | 9 +--------
 gobject/gvaluearray.h                | 3 ---
 13 files changed, 5 insertions(+), 48 deletions(-)
---
diff --git a/gio/gdtlsconnection.h b/gio/gdtlsconnection.h
index 2438de79f..364be935e 100644
--- a/gio/gdtlsconnection.h
+++ b/gio/gdtlsconnection.h
@@ -129,13 +129,11 @@ void                  g_dtls_connection_set_require_close_notify    (GDtlsConnec
 GLIB_AVAILABLE_IN_2_48
 gboolean              g_dtls_connection_get_require_close_notify    (GDtlsConnection       *conn);
 
-#ifndef G_DISABLE_DEPRECATED
 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);
-#endif  /* !G_DISABLE_DEPRECATED */
 
 GLIB_AVAILABLE_IN_2_48
 gboolean              g_dtls_connection_handshake                   (GDtlsConnection       *conn,
diff --git a/gio/gioenums.h b/gio/gioenums.h
index c4f39146d..2fc69b6be 100644
--- a/gio/gioenums.h
+++ b/gio/gioenums.h
@@ -1603,7 +1603,6 @@ typedef enum {
   G_TLS_AUTHENTICATION_REQUIRED
 } GTlsAuthenticationMode;
 
-#ifndef G_DISABLE_DEPRECATED
 /**
  * GTlsRehandshakeMode:
  * @G_TLS_REHANDSHAKE_NEVER: Never allow rehandshaking
@@ -1624,7 +1623,6 @@ typedef enum {
   G_TLS_REHANDSHAKE_SAFELY,
   G_TLS_REHANDSHAKE_UNSAFELY
 } GTlsRehandshakeMode;
-#endif  /* !G_DISABLE_DEPRECATED */
 
 /**
  * GTlsPasswordFlags:
diff --git a/gio/gsimpleasyncresult.h b/gio/gsimpleasyncresult.h
index 25ab53943..8daa91d40 100644
--- a/gio/gsimpleasyncresult.h
+++ b/gio/gsimpleasyncresult.h
@@ -92,12 +92,9 @@ gboolean            g_simple_async_result_get_op_res_gboolean (GSimpleAsyncResul
 
 
 
-#ifndef G_DISABLE_DEPRECATED
 GLIB_AVAILABLE_IN_2_32 /* Also deprecated, but can't mark something both AVAILABLE and DEPRECATED */
 void                g_simple_async_result_set_check_cancellable (GSimpleAsyncResult *simple,
                                                                  GCancellable       *check_cancellable);
-#endif  /* !G_DISABLE_DEPRECATED */
-
 GLIB_DEPRECATED_IN_2_46
 gpointer            g_simple_async_result_get_source_tag   (GSimpleAsyncResult      *simple);
 GLIB_DEPRECATED_IN_2_46
diff --git a/gio/gtlsconnection.h b/gio/gtlsconnection.h
index c436254a6..39ec3fa02 100644
--- a/gio/gtlsconnection.h
+++ b/gio/gtlsconnection.h
@@ -109,13 +109,11 @@ void                  g_tls_connection_set_require_close_notify    (GTlsConnecti
 GLIB_AVAILABLE_IN_ALL
 gboolean              g_tls_connection_get_require_close_notify    (GTlsConnection       *conn);
 
-#ifndef G_DISABLE_DEPRECATED
 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);
-#endif  /* !G_DISABLE_DEPRECATED */
 
 GLIB_AVAILABLE_IN_2_60
 void                  g_tls_connection_set_advertised_protocols    (GTlsConnection       *conn,
diff --git a/glib/deprecated/gthread-deprecated.c b/glib/deprecated/gthread-deprecated.c
index 76544502c..c0ef4deff 100644
--- a/glib/deprecated/gthread-deprecated.c
+++ b/glib/deprecated/gthread-deprecated.c
@@ -97,9 +97,6 @@
  * Deprecated:2.32:POSIX threads are in use on all non-Windows systems.
  *                 Use G_OS_WIN32 to detect Windows.
  */
-#ifdef G_DISABLE_DEPRECATED
-#undef G_THREADS_IMPL_POSIX
-#endif
 
 /**
  * G_THREADS_IMPL_WIN32:
@@ -108,9 +105,7 @@
  *
  * Deprecated:2.32:Use G_OS_WIN32 to detect Windows.
  */
-#ifdef G_DISABLE_DEPRECATED
-#undef G_THREADS_IMPL_WIN32
-#endif
+
 
 /* {{{1 Exported Variables */
 
diff --git a/glib/gmacros.h b/glib/gmacros.h
index 08ddb51c9..cde9f6b43 100644
--- a/glib/gmacros.h
+++ b/glib/gmacros.h
@@ -106,7 +106,7 @@
 #else
 #  define G_INLINE_FUNC static inline
 #endif /* G_IMPLEMENT_INLINES */
-#endif  /* !G_DISABLE_DEPRECATED */
+#endif /* !G_DISABLE_DEPRECATED */
 
 /* Provide macros to feature the GCC function attribute.
  */
@@ -874,7 +874,7 @@
 #else
 #define G_CONST_RETURN const
 #endif
-#endif
+#endif /* !G_DISABLE_DEPRECATED */
 
 /*
  * The G_LIKELY and G_UNLIKELY macros let the programmer give hints to 
diff --git a/glib/gmem.h b/glib/gmem.h
index 923fa86d4..81f8cdde3 100644
--- a/glib/gmem.h
+++ b/glib/gmem.h
@@ -381,10 +381,7 @@ GLIB_VAR gboolean g_mem_gc_friendly;
 
 /* Memory profiler and checker, has to be enabled via g_mem_set_vtable()
  */
-#ifndef G_DISABLE_DEPRECATED
 GLIB_VAR GMemVTable    *glib_mem_profiler_table;
-#endif
-
 GLIB_DEPRECATED_IN_2_46
 void   g_mem_profile   (void);
 
diff --git a/glib/gtestutils.h b/glib/gtestutils.h
index 5f8d06d15..237b0dd10 100644
--- a/glib/gtestutils.h
+++ b/glib/gtestutils.h
@@ -337,7 +337,6 @@ void    g_test_queue_destroy            (GDestroyNotify destroy_func,
                                          gpointer       destroy_data);
 #define g_test_queue_unref(gobject)     g_test_queue_destroy (g_object_unref, gobject)
 
-#ifndef G_DISABLE_DEPRECATED
 /**
  * GTestTrapFlags:
  * @G_TEST_TRAP_SILENCE_STDOUT: Redirect stdout of the test child to
@@ -368,7 +367,6 @@ typedef enum {
 GLIB_DEPRECATED_IN_2_38_FOR (g_test_trap_subprocess)
 gboolean g_test_trap_fork               (guint64              usec_timeout,
                                          GTestTrapFlags       test_trap_flags);
-#endif  /* !G_DISABLE_DEPRECATED */
 
 typedef enum {
   G_TEST_SUBPROCESS_INHERIT_STDIN  = 1 << 0,
diff --git a/glib/gtrashstack.h b/glib/gtrashstack.h
index 9c1db5169..44b3c6c10 100644
--- a/glib/gtrashstack.h
+++ b/glib/gtrashstack.h
@@ -33,8 +33,6 @@
 
 G_BEGIN_DECLS
 
-#ifndef G_DISABLE_DEPRECATED
-
 typedef struct _GTrashStack GTrashStack;
 struct _GTrashStack
 {
@@ -51,8 +49,6 @@ gpointer  g_trash_stack_peek   (GTrashStack **stack_p);
 GLIB_DEPRECATED_IN_2_48
 guint     g_trash_stack_height (GTrashStack **stack_p);
 
-#endif  /* !G_DISABLE_DEPRECATED */
-
 G_END_DECLS
 
 #endif /* __G_TRASH_STACK_H_ */
diff --git a/gobject/gparam.h b/gobject/gparam.h
index d644586db..535b98035 100644
--- a/gobject/gparam.h
+++ b/gobject/gparam.h
@@ -260,8 +260,6 @@ struct _GParamSpecClass
   /*< private >*/
   gpointer       dummy[4];
 };
-
-#ifndef G_DISABLE_DEPRECATED
 /**
  * GParameter:
  * @name: the parameter name
@@ -277,7 +275,7 @@ struct _GParameter /* auxiliary structure for _setv() variants */
   const gchar *name;
   GValue       value;
 };
-#endif  /* !G_DISABLE_DEPRECATED */
+
 
 /* --- prototypes --- */
 GLIB_AVAILABLE_IN_ALL
diff --git a/gobject/gparamspecs.h b/gobject/gparamspecs.h
index 1556cd5c2..26045a368 100644
--- a/gobject/gparamspecs.h
+++ b/gobject/gparamspecs.h
@@ -452,10 +452,7 @@ G_BEGIN_DECLS
  *
  * Deprecated: 2.32: Use #GArray instead of #GValueArray
  */
-#ifndef G_DISABLE_DEPRECATED
 #define        G_TYPE_PARAM_VALUE_ARRAY           (g_param_spec_types[18])
-#endif
-
 /**
  * G_IS_PARAM_SPEC_VALUE_ARRAY:
  * @pspec: a valid #GParamSpec instance
@@ -466,10 +463,7 @@ G_BEGIN_DECLS
  *
  * Deprecated: 2.32: Use #GArray instead of #GValueArray
  */
-#ifndef G_DISABLE_DEPRECATED
 #define G_IS_PARAM_SPEC_VALUE_ARRAY(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_VALUE_ARRAY))
-#endif
-
 /**
  * G_PARAM_SPEC_VALUE_ARRAY:
  * @pspec: a valid #GParamSpec instance
@@ -478,9 +472,7 @@ G_BEGIN_DECLS
  *
  * Deprecated: 2.32: Use #GArray instead of #GValueArray
  */
-#ifndef G_DISABLE_DEPRECATED
 #define G_PARAM_SPEC_VALUE_ARRAY(pspec)    (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_VALUE_ARRAY, 
GParamSpecValueArray))
-#endif
 
 /**
  * G_TYPE_PARAM_OBJECT:
diff --git a/gobject/gtype.h b/gobject/gtype.h
index 0c0b49a8f..a3a07c6a3 100644
--- a/gobject/gtype.h
+++ b/gobject/gtype.h
@@ -621,7 +621,6 @@ struct _GTypeQuery
  */
 #define G_TYPE_FROM_INTERFACE(g_iface)                          (((GTypeInterface*) (g_iface))->g_type)
 
-#ifndef G_DISABLE_DEPRECATED
 /**
  * G_TYPE_INSTANCE_GET_PRIVATE:
  * @instance: the instance of a type deriving from @private_type
@@ -640,7 +639,6 @@ struct _GTypeQuery
  * 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)))
-#endif  /* !G_DISABLE_DEPRECATED */
 
 /**
  * G_TYPE_CLASS_GET_PRIVATE:
@@ -659,7 +657,6 @@ struct _GTypeQuery
  */
 #define G_TYPE_CLASS_GET_PRIVATE(klass, g_type, c_type)   ((c_type*) g_type_class_get_private ((GTypeClass*) 
(klass), (g_type)))
 
-#ifndef G_DISABLE_DEPRECATED
 /**
  * GTypeDebugFlags:
  * @G_TYPE_DEBUG_NONE: Print no messages
@@ -684,17 +681,13 @@ typedef enum      /*< skip >*/
   G_TYPE_DEBUG_INSTANCE_COUNT = 1 << 2,
   G_TYPE_DEBUG_MASK    = 0x07
 } GTypeDebugFlags;
-#endif  /* !G_DISABLE_DEPRECATED */
+
 
 /* --- prototypes --- */
 GLIB_DEPRECATED_IN_2_36
 void                  g_type_init                    (void);
-
-#ifndef G_DISABLE_DEPRECATED
 GLIB_DEPRECATED_IN_2_36
 void                  g_type_init_with_debug_flags   (GTypeDebugFlags  debug_flags);
-#endif
-
 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 fde42144b..d8b6bb55c 100644
--- a/gobject/gvaluearray.h
+++ b/gobject/gvaluearray.h
@@ -27,8 +27,6 @@
 
 G_BEGIN_DECLS
 
-#ifndef G_DISABLE_DEPRECATED
-
 /**
  * G_TYPE_VALUE_ARRAY:
  *
@@ -100,7 +98,6 @@ GValueArray* g_value_array_sort_with_data (GValueArray       *value_array,
                                              GCompareDataFunc   compare_func,
                                              gpointer           user_data);
 
-#endif  /* !G_DISABLE_DEPRECATED */
 
 G_END_DECLS
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]