Re: glib.h suggestion: update_hash functions
- From: Tim Janik <timj gtk org>
- To: Gtk Developers <gtk-devel-list redhat com>
- Subject: Re: glib.h suggestion: update_hash functions
- Date: Sat, 12 Feb 2000 01:18:57 +0100 (CET)
On Fri, 11 Feb 2000, Darin Adler wrote:
> I have another suggestion for a hash-related change to <glib.h>.
>
> I often run into situations where I have to hash more than one string. To
> handle this, I'd like some additional functions that tie in with
> g_str_hash's implementation. These would typically be called in hashing
> functions, rather than being hashing functions themselves:
>
> guint g_str_update_hash (guint old_hash, const gchar * s);
> guint g_int_update_hash (guint old_hash, int i);
> guint g_mem_update_hash (guint old_hash, gconstpointer p, guint c);
>
> You can use a bunch of calls to the update_hash functions in a row to make a
> hash for a composite object.
>
> What do you all think? Should I write these up and submit a patch?
you don't really want to call orther functions from hash functions,
KISS, bite the apple and implement your own specialized hash function
for that case, there were enough examples posted already to work from.
>
> -- Darin
>
---
ciaoTJ
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]