gobject-list
gobject-list copied to clipboard
Fails to compile since glib 2.56
% make
cc -fPIC -rdynamic -g -c -Wall -Wextra `pkg-config --cflags gobject-2.0` -DHAVE_LIBUNWIND gobject-list.c
In file included from /usr/include/glib-2.0/gobject/gbinding.h:29,
from /usr/include/glib-2.0/glib-object.h:23,
from gobject-list.c:25:
/usr/include/glib-2.0/gobject/gobject.h:512:34: error: expected identifier or ‘(’ before ‘__typeof__’
#define g_object_ref(Obj) ((__typeof__(Obj)) (g_object_ref) (Obj))
^~~~~~~~~~
gobject-list.c:405:1: note: in expansion of macro ‘g_object_ref’
g_object_ref (gpointer object)
^~~~~~~~~~~~
/usr/include/glib-2.0/gobject/gobject.h:512:51: error: expected ‘)’ before ‘(’ token
#define g_object_ref(Obj) ((__typeof__(Obj)) (g_object_ref) (Obj))
^
gobject-list.c:405:1: note: in expansion of macro ‘g_object_ref’
g_object_ref (gpointer object)
^~~~~~~~~~~~
make: *** [Makefile:22: gobject-list.o] Fehler 1
from /usr/include/glib-2.0/gobject/gobject.h:
#if defined(g_has_typeof) && GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_56
/* Make reference APIs type safe with macros */
#define g_object_ref(Obj) ((__typeof__(Obj)) (g_object_ref) (Obj))
#define g_object_ref_sink(Obj) ((__typeof__(Obj)) (g_object_ref_sink) (Obj))
#endif
I haven't done much GObject development in recent years, I'd be happy to take a pull request.