Added g_array_length
authorManish Singh <yosh@src.gnome.org>
Sat, 4 Jul 1998 20:39:29 +0000 (20:39 +0000)
committerManish Singh <yosh@src.gnome.org>
Sat, 4 Jul 1998 20:39:29 +0000 (20:39 +0000)
-Yosh

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

index 20d7134..1987cfc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Sat Jul  4 13:38:52 PDT 1998 Manish Singh <yosh@gimp.org>
+
+       * glib.h: added g_array_length
+
 Tue Jun 30 11:58:25 1998  Tim Janik  <timj@gtk.org>
 
        * gscanner.c (g_scanner_unexp_token): take symbol_2_token into
index 20d7134..1987cfc 100644 (file)
@@ -1,3 +1,7 @@
+Sat Jul  4 13:38:52 PDT 1998 Manish Singh <yosh@gimp.org>
+
+       * glib.h: added g_array_length
+
 Tue Jun 30 11:58:25 1998  Tim Janik  <timj@gtk.org>
 
        * gscanner.c (g_scanner_unexp_token): take symbol_2_token into
index 20d7134..1987cfc 100644 (file)
@@ -1,3 +1,7 @@
+Sat Jul  4 13:38:52 PDT 1998 Manish Singh <yosh@gimp.org>
+
+       * glib.h: added g_array_length
+
 Tue Jun 30 11:58:25 1998  Tim Janik  <timj@gtk.org>
 
        * gscanner.c (g_scanner_unexp_token): take symbol_2_token into
index 20d7134..1987cfc 100644 (file)
@@ -1,3 +1,7 @@
+Sat Jul  4 13:38:52 PDT 1998 Manish Singh <yosh@gimp.org>
+
+       * glib.h: added g_array_length
+
 Tue Jun 30 11:58:25 1998  Tim Janik  <timj@gtk.org>
 
        * gscanner.c (g_scanner_unexp_token): take symbol_2_token into
index 20d7134..1987cfc 100644 (file)
@@ -1,3 +1,7 @@
+Sat Jul  4 13:38:52 PDT 1998 Manish Singh <yosh@gimp.org>
+
+       * glib.h: added g_array_length
+
 Tue Jun 30 11:58:25 1998  Tim Janik  <timj@gtk.org>
 
        * gscanner.c (g_scanner_unexp_token): take symbol_2_token into
index 20d7134..1987cfc 100644 (file)
@@ -1,3 +1,7 @@
+Sat Jul  4 13:38:52 PDT 1998 Manish Singh <yosh@gimp.org>
+
+       * glib.h: added g_array_length
+
 Tue Jun 30 11:58:25 1998  Tim Janik  <timj@gtk.org>
 
        * gscanner.c (g_scanner_unexp_token): take symbol_2_token into
index 20d7134..1987cfc 100644 (file)
@@ -1,3 +1,7 @@
+Sat Jul  4 13:38:52 PDT 1998 Manish Singh <yosh@gimp.org>
+
+       * glib.h: added g_array_length
+
 Tue Jun 30 11:58:25 1998  Tim Janik  <timj@gtk.org>
 
        * gscanner.c (g_scanner_unexp_token): take symbol_2_token into
index 20d7134..1987cfc 100644 (file)
@@ -1,3 +1,7 @@
+Sat Jul  4 13:38:52 PDT 1998 Manish Singh <yosh@gimp.org>
+
+       * glib.h: added g_array_length
+
 Tue Jun 30 11:58:25 1998  Tim Janik  <timj@gtk.org>
 
        * gscanner.c (g_scanner_unexp_token): take symbol_2_token into
diff --git a/glib.h b/glib.h
index 0d0f1da..e195553 100644 (file)
--- a/glib.h
+++ b/glib.h
@@ -891,6 +891,8 @@ void         g_string_sprintfa  (GString     *string,
 
 /* Resizable arrays
  */
+#define g_array_length(array,type) \
+     (((array)->len)/sizeof(type))
 #define g_array_append_val(array,type,val) \
      g_rarray_append (array, (gpointer) &val, sizeof (type))
 #define g_array_append_vals(array,type,vals,nvals) \
index 0d0f1da..e195553 100644 (file)
@@ -891,6 +891,8 @@ void         g_string_sprintfa  (GString     *string,
 
 /* Resizable arrays
  */
+#define g_array_length(array,type) \
+     (((array)->len)/sizeof(type))
 #define g_array_append_val(array,type,val) \
      g_rarray_append (array, (gpointer) &val, sizeof (type))
 #define g_array_append_vals(array,type,vals,nvals) \