[Changes from josh to sync with his glib stuff -Yosh]

Fri Jun 12 00:39:28 1998  Josh MacDonald  <jmacd@icw.EECS.Berkeley.EDU>

        * glib.h: add new hash and equal functions g_int_*.  complement
        g_direct_hash with g_direct_equal.

        * grel.c: new file, GRelations implement tuples of N-N mappings.
        A comment in glib.h briefly describes the interface.

        * ghash.c: new function, g_hash_table_size

        * glib.h: new typedefs, gsize, gssize, gtime.

        * garray.c: new functions implementing a simplified GArray.  This
        GPtrArray is an array of gpointers and has functions to add and
        remove elements, much like java.lang.Vector.

        * garray.c: new functions for the single-byte special case of
        GArray.  The functions g_byte_array* operate on arrays of bytes.
        Internally, a GArray is used.

        * testglib.c: tests for g_ptr_array, g_byte_array, and g_relation...
This commit is contained in:
Josh MacDonald
1998-06-12 09:38:32 +00:00
committed by Manish Singh
parent f62aace5b0
commit df9a49ec3c
24 changed files with 1904 additions and 8 deletions

View File

@@ -424,3 +424,11 @@ g_hash_nodes_destroy (GHashNode *hash_node)
node_free_list = hash_node;
}
}
/* Returns the number of elements contained in the hash table. */
gint g_hash_table_size (GHashTable *hash_table)
{
g_return_val_if_fail (hash_table, 0);
return ((GRealHashTable *) hash_table)->nnodes;
}