mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-26 07:26:15 +01:00
make *_get_instance_private const-compliant
This is pure read-only access to an external struct so void warnings for people calling it from const contexts such as accessors https://bugzilla.gnome.org/show_bug.cgi?id=745068 Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
This commit is contained in:
parent
52f23db74a
commit
a3a9664ed2
@ -1938,7 +1938,7 @@ _G_DEFINE_TYPE_EXTENDED_CLASS_INIT(TypeName, type_name) \
|
||||
\
|
||||
G_GNUC_UNUSED \
|
||||
static inline gpointer \
|
||||
type_name##_get_instance_private (TypeName *self) \
|
||||
type_name##_get_instance_private (const TypeName *self) \
|
||||
{ \
|
||||
return (G_STRUCT_MEMBER_P (self, TypeName##_private_offset)); \
|
||||
} \
|
||||
|
Loading…
Reference in New Issue
Block a user