summaryrefslogtreecommitdiff
path: root/glib/gutils.h
diff options
context:
space:
mode:
authorPhilip Withnall <withnall@endlessm.com>2019-05-27 19:29:07 +0100
committerPhilip Withnall <withnall@endlessm.com>2019-05-30 10:38:45 +0100
commitf0fb7b77a13e5fc9a5053f0b11264d1af9a853cc (patch)
treeeab865fc65cba36f4952dada35a852b78a3927db /glib/gutils.h
parent6554c91b1312013e42b42931ee07b961b7e0cdb0 (diff)
downloadglib-f0fb7b77a13e5fc9a5053f0b11264d1af9a853cc.tar.gz
glib, gobject: Annotate deprecated types and enumerators
Use the new `GLIB_DEPRECATED_{TYPE,ENUMERATOR}*` macros to annotate types and enumerators as deprecated, rather than using `G_DISABLE_DEPRECATED`. Signed-off-by: Philip Withnall <withnall@endlessm.com>
Diffstat (limited to 'glib/gutils.h')
-rw-r--r--glib/gutils.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/glib/gutils.h b/glib/gutils.h
index 055ca4605..560a84e3a 100644
--- a/glib/gutils.h
+++ b/glib/gutils.h
@@ -198,7 +198,6 @@ gchar *g_format_size_for_display (goffset size);
#define g_memmove(dest,src,len) \
G_STMT_START { memmove ((dest), (src), (len)); } G_STMT_END GLIB_DEPRECATED_MACRO_IN_2_40_FOR(memmove)
-#ifndef G_DISABLE_DEPRECATED
/**
* GVoidFunc:
*
@@ -206,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
@@ -221,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