[glib] make *_get_instance_private const-compliant
- From: Marc-Antoine Perennou <marcop src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] make *_get_instance_private const-compliant
- Date: Fri, 27 Feb 2015 07:51:41 +0000 (UTC)
commit a3a9664ed202303b899ca55625877542309d1a1f
Author: Marc-Antoine Perennou <Marc-Antoine Perennou com>
Date: Sat Nov 9 12:09:20 2013 +0900
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>
gobject/gtype.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gobject/gtype.h b/gobject/gtype.h
index fadaadb..68bc051 100644
--- a/gobject/gtype.h
+++ b/gobject/gtype.h
@@ -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)); \
} \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]