Let the G_DECLARE_DERIVABLE_TYPE() accept const pointers in MODULE##_IS_##OBJ_NAME
I get a lot of compiler warnings about using const object as an argument to a MODULE_IS_TYPE() call generated by the G_DECLARE_DERIVABLE_TYPE
macro like this:
/usr/include/glib-2.0/gobject/gtype.h:1507:73: note: expected ‘gpointer’ {aka ‘void *’} but argument is of type ‘const ICalProperty *’ {aka ‘const struct _ICalProperty *’}
1507 | G_GNUC_UNUSED static inline gboolean MODULE##_IS_##OBJ_NAME (gpointer ptr) { /build/local
/include/libical-glib/i-cal-property.h:38:1: note: in expansion of macro ‘G_DECLARE_DERIVABLE_TYPE’
It's very inconvenient to typecast everything, especially when it was not needed before a use of the G_DECLARE_DERIVABLE_TYPE
(the G_TYPE_CHECK_INSTANCE_TYPE
works fine with const objects passed to it).
Is it really necessary to use gpointer
instead of gconstpointer
there, please?