change order of gpointer data; field in struct _GNode to be partly binary
authorTim Janik <timj@gtk.org>
Mon, 3 Aug 1998 14:06:18 +0000 (14:06 +0000)
committerTim Janik <timj@src.gnome.org>
Mon, 3 Aug 1998 14:06:18 +0000 (14:06 +0000)
Mon Aug  3 16:02:26 1998  Tim Janik  <timj@gtk.org>

        * glib.h:
        * gnode.c: change order of gpointer data; field in struct _GNode to
        be partly binary compatible with GList and GSList.

12 files changed:
ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-12
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
glib.h
glib/glib.h
glib/gnode.c
gnode.c

index b393a66..2b55fc2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Mon Aug  3 16:02:26 1998  Tim Janik  <timj@gtk.org>
+
+       * glib.h: 
+       * gnode.c: change order of gpointer data; field in struct _GNode to
+       be partly binary compatible with GList and GSList.
+
 1998-08-03  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
 
        * garray.c (g_ptr_array_remove_index): bugfix: index check for
index b393a66..2b55fc2 100644 (file)
@@ -1,3 +1,9 @@
+Mon Aug  3 16:02:26 1998  Tim Janik  <timj@gtk.org>
+
+       * glib.h: 
+       * gnode.c: change order of gpointer data; field in struct _GNode to
+       be partly binary compatible with GList and GSList.
+
 1998-08-03  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
 
        * garray.c (g_ptr_array_remove_index): bugfix: index check for
index b393a66..2b55fc2 100644 (file)
@@ -1,3 +1,9 @@
+Mon Aug  3 16:02:26 1998  Tim Janik  <timj@gtk.org>
+
+       * glib.h: 
+       * gnode.c: change order of gpointer data; field in struct _GNode to
+       be partly binary compatible with GList and GSList.
+
 1998-08-03  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
 
        * garray.c (g_ptr_array_remove_index): bugfix: index check for
index b393a66..2b55fc2 100644 (file)
@@ -1,3 +1,9 @@
+Mon Aug  3 16:02:26 1998  Tim Janik  <timj@gtk.org>
+
+       * glib.h: 
+       * gnode.c: change order of gpointer data; field in struct _GNode to
+       be partly binary compatible with GList and GSList.
+
 1998-08-03  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
 
        * garray.c (g_ptr_array_remove_index): bugfix: index check for
index b393a66..2b55fc2 100644 (file)
@@ -1,3 +1,9 @@
+Mon Aug  3 16:02:26 1998  Tim Janik  <timj@gtk.org>
+
+       * glib.h: 
+       * gnode.c: change order of gpointer data; field in struct _GNode to
+       be partly binary compatible with GList and GSList.
+
 1998-08-03  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
 
        * garray.c (g_ptr_array_remove_index): bugfix: index check for
index b393a66..2b55fc2 100644 (file)
@@ -1,3 +1,9 @@
+Mon Aug  3 16:02:26 1998  Tim Janik  <timj@gtk.org>
+
+       * glib.h: 
+       * gnode.c: change order of gpointer data; field in struct _GNode to
+       be partly binary compatible with GList and GSList.
+
 1998-08-03  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
 
        * garray.c (g_ptr_array_remove_index): bugfix: index check for
index b393a66..2b55fc2 100644 (file)
@@ -1,3 +1,9 @@
+Mon Aug  3 16:02:26 1998  Tim Janik  <timj@gtk.org>
+
+       * glib.h: 
+       * gnode.c: change order of gpointer data; field in struct _GNode to
+       be partly binary compatible with GList and GSList.
+
 1998-08-03  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
 
        * garray.c (g_ptr_array_remove_index): bugfix: index check for
index b393a66..2b55fc2 100644 (file)
@@ -1,3 +1,9 @@
+Mon Aug  3 16:02:26 1998  Tim Janik  <timj@gtk.org>
+
+       * glib.h: 
+       * gnode.c: change order of gpointer data; field in struct _GNode to
+       be partly binary compatible with GList and GSList.
+
 1998-08-03  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
 
        * garray.c (g_ptr_array_remove_index): bugfix: index check for
diff --git a/glib.h b/glib.h
index b48ed11..e05c5f5 100644 (file)
--- a/glib.h
+++ b/glib.h
@@ -748,12 +748,11 @@ gint       g_tree_nnodes   (GTree         *tree);
  */
 struct _GNode
 {
-  GNode *prev;
+  gpointer data;
   GNode *next;
+  GNode *prev;
   GNode *parent;
   GNode *children;
-  
-  gpointer data;
 };
 
 #define         G_NODE_IS_ROOT(node)   (((GNode*) (node))->parent == NULL && \
index b48ed11..e05c5f5 100644 (file)
@@ -748,12 +748,11 @@ gint       g_tree_nnodes   (GTree         *tree);
  */
 struct _GNode
 {
-  GNode *prev;
+  gpointer data;
   GNode *next;
+  GNode *prev;
   GNode *parent;
   GNode *children;
-  
-  gpointer data;
 };
 
 #define         G_NODE_IS_ROOT(node)   (((GNode*) (node))->parent == NULL && \
index 2279de2..a70b204 100644 (file)
@@ -49,11 +49,11 @@ g_node_new (gpointer data)
   else
     node = g_chunk_new (GNode, g_tree_node_chunk);
   
-  node->prev = NULL;
+  node->data = data;
   node->next = NULL;
+  node->prev = NULL;
   node->parent = NULL;
   node->children = NULL;
-  node->data = data;
   
   return node;
 }
diff --git a/gnode.c b/gnode.c
index 2279de2..a70b204 100644 (file)
--- a/gnode.c
+++ b/gnode.c
@@ -49,11 +49,11 @@ g_node_new (gpointer data)
   else
     node = g_chunk_new (GNode, g_tree_node_chunk);
   
-  node->prev = NULL;
+  node->data = data;
   node->next = NULL;
+  node->prev = NULL;
   node->parent = NULL;
   node->children = NULL;
-  node->data = data;
   
   return node;
 }