diff options
author | chuck <chuck@13f79535-47bb-0310-9956-ffa450edef68> | 2000-06-12 21:31:03 +0000 |
---|---|---|
committer | chuck <chuck@13f79535-47bb-0310-9956-ffa450edef68> | 2000-06-12 21:31:03 +0000 |
commit | 661331289823cb09731359b9efdcb6ab0686619a (patch) | |
tree | a42d724bf5cba304c1c5a0ecf65f6163ea3fef03 /lib | |
parent | db476b70aacd1837bbdfeb72f507350de730bc59 (diff) | |
download | libapr-661331289823cb09731359b9efdcb6ab0686619a.tar.gz |
Added comments concerning ap_table_vdo and its use for the caching API:
The caching api will allow a user to walk the header values:
ap_status_t ap_cache_el_header_walk(ap_cache_el *el,
int (*comp)(void *, const char *, const char *), void *rec, ...);
So it can be ..., however from there I use a callback that uses a va_list:
ap_status_t (*cache_el_header_walk)(ap_cache_el *el,
int (*comp)(void *, const char *, const char *), void *rec, va_list);
To pass those ...'s on down to the actual module that will handle walking
their headers, in the file case this is actually just an ap_table - and
rather than reimplementing ap_table_do (which IMHO would be bad) I just
called it with the va_list. For mod_shmem_cache I don't need it since I
can't use ap_table's, but mod_file_cache should (though a good hash would
be better, but that's a different issue :).
So short answer, to make mod_file_cache easier to maintain, it's a good thing
PR:
Obtained from:
Submitted by: Sam Magnuson
Reviewed by: Chuck Murcko, Ryan Bloom
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60189 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'lib')
-rw-r--r-- | lib/apr_tables.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/apr_tables.c b/lib/apr_tables.c index 556e408d3..a7d2b6761 100644 --- a/lib/apr_tables.c +++ b/lib/apr_tables.c @@ -584,6 +584,27 @@ APR_EXPORT(ap_table_t *) ap_overlay_tables(ap_pool_t *p, * * Note that rec is simply passed-on to the comp function, so that the * caller can pass additional info for the task. + * + * ADDENDUM for ap_table_vdo(): + * + * The caching api will allow a user to walk the header values: + * + * ap_status_t ap_cache_el_header_walk(ap_cache_el *el, + * int (*comp)(void *, const char *, const char *), void *rec, ...); + * + * So it can be ..., however from there I use a callback that use a va_list: + * + * ap_status_t (*cache_el_header_walk)(ap_cache_el *el, + * int (*comp)(void *, const char *, const char *), void *rec, va_list); + * + * To pass those ...'s on down to the actual module that will handle walking + * their headers, in the file case this is actually just an ap_table - and + * rather than reimplementing ap_table_do (which IMHO would be bad) I just + * called it with the va_list. For mod_shmem_cache I don't need it since I + * can't use ap_table's, but mod_file_cache should (though a good hash would + * be better, but that's a different issue :). + * + * So to make mod_file_cache easier to maintain, it's a good thing */ APR_EXPORT(void) ap_table_do(int (*comp) (void *, const char *, const char *), void *rec, const ap_table_t *t, ...) |