[PATCH] Functions much easier to use than apr_hash_this()
From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Thu, 09 Jul 2009 18:30:16 +0100
The attached patch adds three functions for dereferencing an APR hash
for (hi = apr_hash_first(pool, entries); hi; hi = apr_hash_next(hi))
apr_hash_this(hi, &key, NULL, &val);
... (code that uses the key "name" and value "wc_entry") ...
The reason for the temporary variables "key" and "val" is that you can't
With the attached patch, the above can be rewritten as:
for (hi = apr_hash_first(pool, entries); hi; hi = apr_hash_next(hi))
... (code that uses the key "name" and value "wc_entry") ...
We have just started using these functions (but with an additional
I offer and recommend this patch for inclusion in APR. Please let me
Thanks.
------------------------------------------------------
|
This is an archived mail posted to the Subversion Dev mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.