mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-12 21:40:19 +00:00
removed deprecated g_string_equal and g_string_hash.
Thu Feb 12 22:48:11 1998 Owen Taylor <owt1@cornell.edu> * gstring.c glib.h: removed deprecated g_string_equal and g_string_hash.
This commit is contained in:
parent
9dee8ee4e4
commit
c43a50fe36
@ -722,12 +722,6 @@ gint g_str_equal (const gpointer v,
|
||||
const gpointer v2);
|
||||
guint g_str_hash (const gpointer v);
|
||||
|
||||
/* Deprecated, use g_string_*
|
||||
*/
|
||||
gint g_string_equal (gpointer v,
|
||||
gpointer v2);
|
||||
guint g_string_hash (gpointer v);
|
||||
|
||||
|
||||
|
||||
/* GScanner: Flexible lexical scanner for general purpose.
|
||||
|
@ -72,33 +72,6 @@ g_str_hash (const gpointer v)
|
||||
return h /* % M */;
|
||||
}
|
||||
|
||||
/* Deprecated, use g_str_* ... */
|
||||
|
||||
gint
|
||||
g_string_equal (gpointer v, gpointer v2)
|
||||
{
|
||||
return strcmp ((gchar*) v, (gchar*)v2) == 0;
|
||||
}
|
||||
|
||||
/* a char* hash function from ASU */
|
||||
guint
|
||||
g_string_hash (gpointer v)
|
||||
{
|
||||
char *s = (char*)v;
|
||||
char *p;
|
||||
guint h=0, g;
|
||||
|
||||
for(p = s; *p != '\0'; p += 1) {
|
||||
h = ( h << 4 ) + *p;
|
||||
if ( ( g = h & 0xf0000000 ) ) {
|
||||
h = h ^ (g >> 24);
|
||||
h = h ^ g;
|
||||
}
|
||||
}
|
||||
|
||||
return h /* % M */;
|
||||
}
|
||||
|
||||
|
||||
/* String Chunks.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user