Skip to content
Snippets Groups Projects
Commit 0f134fe0 authored by Simon McVittie's avatar Simon McVittie
Browse files

glib-compat: Cast second argument of g_clear_pointer


In the real GLib version, constructs like
g_clear_pointer (&hash, g_hash_table_unref) are allowed, and do not
provoke warnings.

Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
parent 4be6c59a
No related branches found
No related tags found
1 merge request!23Add a skeleton for SrtSystemInfo
......@@ -42,7 +42,8 @@ _srt_steal_pointer (gpointer pointer_to_pointer)
#endif
#if !GLIB_CHECK_VERSION(2, 34, 0)
#define g_clear_pointer(x, destroy) _srt_clear_pointer (x, destroy)
#define g_clear_pointer(x, destroy) \
_srt_clear_pointer (x, (GDestroyNotify) (void (*)(void)) destroy)
/* A simplified version of g_clear_pointer without type-safety. */
static inline void
_srt_clear_pointer (gpointer pointer_to_pointer,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment