[glib] Revert "make *_get_instance_private const-compliant"



commit 85a23529ab8e3de4656c134fc3a380db91b1d762
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Mon Jan 18 18:48:42 2016 +0000

    Revert "make *_get_instance_private const-compliant"
    
    This reverts commit a3a9664ed202303b899ca55625877542309d1a1f.
    
    Constifying the autogenerated get_instance_private functio makes C++
    compilers and GCC with -Wcast-qual warn during compilation of GLib and
    projects depending on GLib.
    
    Since using const with GObject instances is not a common coding
    practice, it's better to revert than trying to make every sigle GType
    function const-safe (and possibly add more compiler warnings in the
    process).
    
    https://bugzilla.gnome.org/show_bug.cgi?id=745068

 gobject/gtype.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gobject/gtype.h b/gobject/gtype.h
index 7c3936b..b564bbb 100644
--- a/gobject/gtype.h
+++ b/gobject/gtype.h
@@ -1949,7 +1949,7 @@ _G_DEFINE_TYPE_EXTENDED_CLASS_INIT(TypeName, type_name) \
 \
 G_GNUC_UNUSED \
 static inline gpointer \
-type_name##_get_instance_private (const TypeName *self) \
+type_name##_get_instance_private (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]