Index: glib/src/nodetree.hg
===================================================================
--- glib/src/nodetree.hg	(revision 714)
+++ glib/src/nodetree.hg	(working copy)
@@ -82,6 +82,12 @@
     return reinterpret_cast<NodeTree<T>* >(node->data);
   }
 
+protected:
+  inline GNode* gobj_unconst() const
+  {
+    return gobject_;
+  }
+
 public:
   explicit NodeTree(T& data) :
     data_(data)
@@ -347,7 +353,7 @@
     GNode* child = 0;
     type_traverse_gnode_slot bound_slot = sigc::bind(real_slot, data, &child);
 
-    g_node_traverse(gobject_, (GTraverseType)order, (GTraverseFlags)flags, -1, c_callback_traverse_compare_node, reinterpret_cast<gpointer>(&bound_slot));
+    g_node_traverse(gobj_unconst(), (GTraverseType)order, (GTraverseFlags)flags, -1, c_callback_traverse_compare_node, reinterpret_cast<gpointer>(&bound_slot));
 
     return wrap(child);
   }
@@ -395,7 +401,7 @@
    */
   int child_position(const NodeTree<T>& child) const
   {
-    return g_node_child_position(gobj(), const_cast<GNode*>(child.gobj()));
+    return g_node_child_position(gobj_unconst(), const_cast<GNode*>(child.gobj()));
   }
   _IGNORE(g_node_child_position)
 
@@ -536,7 +542,7 @@
    */
   bool is_leaf() const
   {
-    return G_NODE_IS_LEAF(gobj());
+    return G_NODE_IS_LEAF(gobj_unconst());
   }
 
   /** Returns true if this is the root node.
@@ -545,7 +551,7 @@
    */
   bool is_root() const
   {
-    return G_NODE_IS_ROOT(gobj());
+    return G_NODE_IS_ROOT(gobj_unconst());
   }
 
   /** Gets the depth of this node.
@@ -556,7 +562,7 @@
    */
   guint depth() const
   {
-    return g_node_depth(gobj());
+    return g_node_depth(gobj_unconst());
   }
   _IGNORE(g_node_depth)
 
@@ -567,7 +573,7 @@
    */
   guint node_count(TraverseFlags flags = TRAVERSE_ALL) const
   {
-    return g_node_n_nodes(gobj(), (GTraverseFlags)flags);
+    return g_node_n_nodes(gobj_unconst(), (GTraverseFlags)flags);
   }
   _IGNORE(g_node_n_nodes)
 
@@ -577,7 +583,7 @@
    */
   guint child_count() const
   {
-    return g_node_n_children(gobj());
+    return g_node_n_children(gobj_unconst());
   }
   _IGNORE(g_node_n_children)
 
@@ -590,7 +596,7 @@
    */
   bool is_ancestor(const NodeTree<T>& descendant) const
   {
-    return g_node_is_ancestor(gobj(), const_cast<GNode*>(descendant.gobj()));
+    return g_node_is_ancestor(gobj_unconst(), descendant.gobj_unconst());
   }
   _IGNORE(g_node_is_ancestor)
 
@@ -602,7 +608,7 @@
    */
   guint get_max_height() const
   {
-    return g_node_max_height(const_cast<GNode*>(gobj()));
+    return g_node_max_height(gobj_unconst());
   }
   _IGNORE(g_node_max_height)
 
