Merge branch 'drop-g-disable-deprecated' into 'master'

Drop G_DISABLE_DEPRECATED

Closes #1060 and #638

See merge request GNOME/glib!871
This commit is contained in:
Philip Withnall 2019-06-14 11:24:25 +00:00
commit fa5996927f
56 changed files with 607 additions and 215 deletions

View File

@ -93,11 +93,10 @@ this range will trigger compiler warnings.
</para>
<para>
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 <literal>-DG_DISABLE_DEPRECATED</literal>.
<literal>G_DISABLE_DEPRECATED</literal> has been removed. All deprecations
are now handled using the above mechanism.
</para>
<para>

View File

@ -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),
]

View File

@ -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

View File

@ -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:

View File

@ -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,

View File

@ -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>
@ -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,

View File

@ -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:

View File

@ -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:

View File

@ -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,

View File

@ -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:

View File

@ -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,

View File

@ -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:

View File

@ -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 <string.h>
#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

View File

@ -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:

View File

@ -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,

View File

@ -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:

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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"

View File

@ -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

View File

@ -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

View File

@ -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 <pthread.h>
#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

View File

@ -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:
*

View File

@ -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

View File

@ -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);

View File

@ -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
*/

View File

@ -102,14 +102,12 @@
#include <glib/gwin32.h>
#endif
#ifndef G_DISABLE_DEPRECATED
#include <glib/deprecated/gallocator.h>
#include <glib/deprecated/gcache.h>
#include <glib/deprecated/gcompletion.h>
#include <glib/deprecated/gmain.h>
#include <glib/deprecated/grel.h>
#include <glib/deprecated/gthread.h>
#endif /* G_DISABLE_DEPRECATED */
#include <glib/glib-autocleanups.h>

View File

@ -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@

View File

@ -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 thats 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__

View File

@ -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

View File

@ -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

View File

@ -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 */

View File

@ -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

View File

@ -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:

View File

@ -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,

View File

@ -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);

View File

@ -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"
/**

View File

@ -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_ */

View File

@ -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:

View File

@ -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

View File

@ -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

View File

@ -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__ */

View File

@ -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 },

View File

@ -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],
)

View File

@ -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)

View File

@ -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,

View File

@ -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 --- */

View File

@ -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:

View File

@ -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

View File

@ -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:

View File

@ -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

View File

@ -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;

View File

@ -1,3 +1,6 @@
/* We are testing some deprecated APIs here */
#define GLIB_DISABLE_DEPRECATION_WARNINGS
#include <glib-object.h>
typedef struct {

View File

@ -1,6 +1,5 @@
#undef G_DISABLE_ASSERT
#undef G_LOG_DOMAIN
#undef G_DISABLE_DEPRECATED
#include <time.h>
#include <stdlib.h>

View File

@ -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);