mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-01 23:13:40 +02:00
glib, gio: Use GLIB_DEPRECATED_MACRO instead of G_DISABLE_DEPRECATED
When defining deprecated macros, annotate them with `GLIB_DEPRECATED_MACRO_IN_*()` and `GLIB_DEPRECATED_MACRO_IN_*_FOR()` to conditionally emit warnings if people use them, depending on their declared minimum and maximum GLib version requirements (see `GLIB_VERSION_MIN_REQUIRED` and `GLIB_VERSION_MAX_ALLOWED`). The old way of doing this was for users to define `G_DISABLE_DEPRECATED` if they didn’t want to use deprecated APIs, but it reported errors via missing symbols, and wasn’t version-dependent. It’s being phased out. Signed-off-by: Philip Withnall <withnall@endlessm.com>
This commit is contained in:
@@ -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:
|
||||
|
Reference in New Issue
Block a user