[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pika-dev] Re: Hashtrees a bit unflexible
From: |
Tom Lord |
Subject: |
[Pika-dev] Re: Hashtrees a bit unflexible |
Date: |
Mon, 15 Mar 2004 13:37:11 -0800 (PST) |
> From: Andreas Rottmann <address@hidden>
> I just noted that hackerlabs hashtrees are a bit unflexible compared
> to the GLib ones: You cannot pass an additional pointer to e.g. the
> hashtree_free_data_fn. I would however need this functionality to be
> able to keep the storage in a memchunk for efficient (esp. space-wise)
> allocation.
> A hack to do so would involve using a special "rules" structure that
> has an additional field. Is this the way it's ment to work, or should
> hashtree functions be extended to take an additional void * argument?
> If the argument would be last, this change wouldn't break ABI wrt
> existing usage, I think. Tom?
Data and keys should be coextensive with `struct hashtree' nodes.
Thus, the `free_hashtree_fn' should be able to do what you want. Is
there some reason why it can't?
-t