[gtkmm] Fix the build with the latest GTK+.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm] Fix the build with the latest GTK+.
- Date: Fri, 26 Nov 2010 12:43:49 +0000 (UTC)
commit 3ba9131c341e9153dee2a937f061472feb225a8f
Author: Murray Cumming <murrayc murrayc com>
Date: Fri Nov 26 13:43:28 2010 +0100
Fix the build with the latest GTK+.
* gtk/gtkmm/targetentry.cc: Destructor: Use const_cast<> so we can
g_free() our dynamically-allocated GtkTargetEntry::target string.
The const change in GTK+ does not seem wise:
https://bugzilla.gnome.org/show_bug.cgi?id=565665#c10
ChangeLog | 9 +++++++++
gtk/gtkmm/targetentry.cc | 4 +++-
2 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index fc00138..62678a9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
2010-11-26 Murray Cumming <murrayc murrayc com>
+ Fix the build with the latest GTK+.
+
+ * gtk/gtkmm/targetentry.cc: Destructor: Use const_cast<> so we can
+ g_free() our dynamically-allocated GtkTargetEntry::target string.
+ The const change in GTK+ does not seem wise:
+ https://bugzilla.gnome.org/show_bug.cgi?id=565665#c10
+
+2010-11-26 Murray Cumming <murrayc murrayc com>
+
Ruler: Removed because it was removed from GTK+.
* gtk/src/ruler.[hg|ccg]: Removed.
diff --git a/gtk/gtkmm/targetentry.cc b/gtk/gtkmm/targetentry.cc
index fc646e9..037acfa 100644
--- a/gtk/gtkmm/targetentry.cc
+++ b/gtk/gtkmm/targetentry.cc
@@ -56,7 +56,9 @@ TargetEntry::TargetEntry(const TargetEntry& src)
TargetEntry::~TargetEntry()
{
- g_free(gobject_.target);
+ //See https://bugzilla.gnome.org/show_bug.cgi?id=565665#c10 about the
+ //const_cast<>.
+ g_free(const_cast<char*>(gobject_.target));
}
TargetEntry& TargetEntry::operator=(const TargetEntry& src)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]