[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [pdf-devel] Hash module API
From: |
jemarch |
Subject: |
Re: [pdf-devel] Hash module API |
Date: |
Sun, 06 Apr 2008 21:06:52 +0200 |
User-agent: |
Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (Shijō) APEL/10.6 Emacs/23.0.60 (powerpc-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) |
> `pdf_status_t pdf_hash_mapkeys (hash_table,
> pdf_hash_mapkeys_fn_t func,
> void *client_data)'
>
> Apply FUNC to each element contained in HASH_TABLE. The prototype
> of FUNC should be:
>
> pdf_status_t func (pdf_hash_t hash_table, char *key, void
*client_data)
>
> FIXME: Should we define an order???
If there exists a situation in wich order is relevant then we can define an
iterator type over the keys or elements instead of the "pdf_hash_mapkeys()"
function.
I agree. That solution is much better. It is also consistent with the
list module design.
We should determine an order for the iterators. In a similar function
in the Adobe Acrobat SDK they use the following order schema:
"Keys consisting solely of digits are enumerated first, in numeric
order (assuming they are not padded with zeros at the front, which
will confuse matters). Non-numeric keys are then enumerated in
strcmp order."
I think would be good to follow the same rule in our implementation.
> I don't know how the enum "pdf_hash_value_type_e" is going to be
> used yet.
>
> We are not going to use that type, since we are working with generic
> pointers to store data into the hash table. The definition of
> `pdf_hash_value_type_e' in gnupdf.texi should be deleted.
>
I agree.
I'll add the rest of the functions you suggested.
Thanks.
- [pdf-devel] Hash module API, gerel, 2008/04/05
- Re: [pdf-devel] Hash module API, gerel, 2008/04/05
- Re: [pdf-devel] Hash module API, jemarch, 2008/04/06
- Re: [pdf-devel] Hash module API, gerel, 2008/04/06
- Re: [pdf-devel] Hash module API,
jemarch <=
- Re: [pdf-devel] Hash module API, gerel, 2008/04/06
- Re: [pdf-devel] Hash module API, jemarch, 2008/04/07
- Re: [pdf-devel] Hash module API, gerel, 2008/04/07
- Re: [pdf-devel] Hash module API, jemarch, 2008/04/08
- Re: [pdf-devel] Hash module API, gerel, 2008/04/09
- Re: [pdf-devel] Hash module API, gerel, 2008/04/09
- Re: [pdf-devel] Hash module API, jemarch, 2008/04/10
- Re: [pdf-devel] Hash module API, jemarch, 2008/04/10
- Re: [pdf-devel] Hash module API, gerel, 2008/04/10
- Re: [pdf-devel] Hash module API, jemarch, 2008/04/10