You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Gunter Coelle <gu...@dbaudio.com> on 2003/05/02 14:31:44 UTC
[PATCH] Bugfix on deletion of hash entires
The doc for apr_hash_first states:
"There is no restriction on adding or deleting hash entries during an
iteration(...)"
This is not true for a constelation as follows:
If the table iterator (apr_hash_index_t struct) hi->next points to an
entry, which is beeing deleted between two calls of apr_hash_next(),
then the second apr_hash_next() will still return the deleted entry.
The following patch tries to solve this by marking the deleted entry by
setting the value to NULL.
- gunter