mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-21 08:28:53 +02:00
updated
Thu Jun 29 15:57:28 2000 Owen Taylor <otaylor@redhat.com> * NEWS: updated * Makefile.am: added snapcheck target to go along with snapshot * gstring.c glib.h (g_string_hash): Add g_string_hash to go along with g_string_equal. Tue Jun 27 12:40:23 EDT 2000 David A. Wheeler <dwheeler@dwheeler.com> * glib.h: Added g_string_equal for comparing GStrings; changed g_str_equal so it returns gboolean (instead of gint). * gstring.c: Modified GString implementation to support embedded ASCII NUL ('\0') characters, and implemented g_string_equal. * testglib.c tests/string-test.c: Added tests for g_string_equal and tests for proper handling of embedded ASCII NUL characters.
This commit is contained in:
15
glib/glib.h
15
glib/glib.h
@@ -1865,6 +1865,9 @@ GString* g_string_new (const gchar *init);
|
||||
GString* g_string_sized_new (guint dfl_size);
|
||||
void g_string_free (GString *string,
|
||||
gboolean free_segment);
|
||||
gboolean g_string_equal (const GString *v,
|
||||
const GString *v2);
|
||||
guint g_string_hash (const GString *str);
|
||||
GString* g_string_assign (GString *string,
|
||||
const gchar *rval);
|
||||
GString* g_string_truncate (GString *string,
|
||||
@@ -1989,13 +1992,13 @@ GByteArray* g_byte_array_remove_index_fast (GByteArray *array,
|
||||
|
||||
/* Hash Functions
|
||||
*/
|
||||
gint g_str_equal (gconstpointer v,
|
||||
gconstpointer v2);
|
||||
guint g_str_hash (gconstpointer v);
|
||||
gboolean g_str_equal (gconstpointer v,
|
||||
gconstpointer v2);
|
||||
guint g_str_hash (gconstpointer v);
|
||||
|
||||
gint g_int_equal (gconstpointer v,
|
||||
gconstpointer v2);
|
||||
guint g_int_hash (gconstpointer v);
|
||||
gint g_int_equal (gconstpointer v,
|
||||
gconstpointer v2);
|
||||
guint g_int_hash (gconstpointer v);
|
||||
|
||||
/* This "hash" function will just return the key's adress as an
|
||||
* unsigned integer. Useful for hashing on plain adresses or
|
||||
|
Reference in New Issue
Block a user