]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
The cache_hash, cache_pqueue and cache_cache functions
authorWilliam A. Rowe Jr <wrowe@apache.org>
Fri, 6 Jun 2008 21:53:37 +0000 (21:53 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Fri, 6 Jun 2008 21:53:37 +0000 (21:53 +0000)
are undecorated, their .h files are not propagated into
an installed include/ tree, and were erroniously exported.

This doesn't require an mmn bump, because anyone who might
have consumed these modules would have succeeded only with
win32, consuming private headers, and absolutely fails on unix.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@664149 13f79535-47bb-0310-9956-ffa450edef68

modules/cache/cache_cache.c
modules/cache/cache_cache.h
modules/cache/cache_hash.c
modules/cache/cache_hash.h
modules/cache/mod_cache.dsp
modules/cache/mod_mem_cache.dsp

index 860800bb4c999a4dbf06d215f814624d31cd1de7..4fc95d73f7685bb966a223d115d200284f6a368c 100644 (file)
@@ -44,7 +44,7 @@ struct cache_cache_t  {
     cache_cache_free *free_entry;
 };
 
-CACHE_DECLARE(cache_cache_t *)cache_init(int max_entries,
+cache_cache_t* cache_init(int max_entries,
                                          apr_size_t max_size,
                                          cache_pqueue_get_priority get_pri,
                                          cache_pqueue_set_priority set_pri,
@@ -75,7 +75,7 @@ CACHE_DECLARE(cache_cache_t *)cache_init(int max_entries,
     return tmp;
 }
 
-CACHE_DECLARE(void) cache_free(cache_cache_t *c)
+void cache_free(cache_cache_t *c)
 {
     cache_pq_free(c->pq);
     cache_hash_free(c->ht);
@@ -83,12 +83,12 @@ CACHE_DECLARE(void) cache_free(cache_cache_t *c)
 }
 
 
-CACHE_DECLARE(void*) cache_find(cache_cache_t* c, const char *key)
+void* cache_find(cache_cache_t* c, const char *key)
 {
     return cache_hash_get(c->ht, key, CACHE_HASH_KEY_STRING);
 }
 
-CACHE_DECLARE(void) cache_update(cache_cache_t* c, void *entry)
+void cache_update(cache_cache_t* c, void *entry)
 {
     long old_priority;
     long new_priority;
@@ -99,7 +99,7 @@ CACHE_DECLARE(void) cache_update(cache_cache_t* c, void *entry)
     cache_pq_change_priority(c->pq, old_priority, new_priority, entry);
 }
 
-CACHE_DECLARE(void) cache_insert(cache_cache_t* c, void *entry)
+void cache_insert(cache_cache_t* c, void *entry)
 {
     void *ejected = NULL;
     long priority;
@@ -132,7 +132,7 @@ CACHE_DECLARE(void) cache_insert(cache_cache_t* c, void *entry)
     cache_hash_set(c->ht, c->key_entry(entry), CACHE_HASH_KEY_STRING, entry);
 }
 
-CACHE_DECLARE(void *) cache_pop(cache_cache_t *c)
+void* cache_pop(cache_cache_t *c)
 {
     void *entry;
 
@@ -150,7 +150,7 @@ CACHE_DECLARE(void *) cache_pop(cache_cache_t *c)
     return entry;
 }
 
-CACHE_DECLARE(apr_status_t) cache_remove(cache_cache_t *c, void *entry)
+apr_status_t cache_remove(cache_cache_t *c, void *entry)
 {
     apr_size_t entry_size = c->size_entry(entry);
     apr_status_t rc;
index 042c5d50fdef1774bc9114a7bdd04f8d05003b37..e805cf206c36de365c25852153d4a0e7c2206d98 100644 (file)
@@ -57,7 +57,7 @@ typedef void cache_cache_free(void *a);
  * @param key_entry   callback to get the key of a entry
  * @param free_entry  callback to free an entry
  */
-CACHE_DECLARE(cache_cache_t *)cache_init(int max_entries, 
+cache_cache_t* cache_init(int max_entries, 
                                          apr_size_t max_size,
                                          cache_pqueue_get_priority get_pri,
                                          cache_pqueue_set_priority set_pri,
@@ -72,37 +72,37 @@ CACHE_DECLARE(cache_cache_t *)cache_init(int max_entries,
  * free up the cache
  * @param c the cache
  */
-CACHE_DECLARE(void) cache_free(cache_cache_t *c);
+void cache_free(cache_cache_t *c);
 /**
  * find a entry in the cache, incrementing the frequency if found
  * @param c the cache
  * @param key the key
  */
-CACHE_DECLARE(void*) cache_find(cache_cache_t* c, const char *key);
+void* cache_find(cache_cache_t* c, const char *key);
 /** 
  * insert a entry into the cache
  * @param c the cache
  * @param entry the entry
  */
-CACHE_DECLARE(void) cache_update(cache_cache_t* c, void *entry);
+void cache_update(cache_cache_t* c, void *entry);
 /** 
  * insert a entry into the cache
  * @param c the cache
  * @param entry the entry
  */
-CACHE_DECLARE(void) cache_insert(cache_cache_t* c, void *entry);
+void cache_insert(cache_cache_t* c, void *entry);
 /**
  * pop the lowest priority item off
  * @param c the cache
  * @returns the entry or NULL
  */
-CACHE_DECLARE(void *)cache_pop(cache_cache_t* c);
+void* cache_pop(cache_cache_t* c);
 /** 
  * remove an item from the cache 
  * @param c the cache
  * @param entry the actual entry (from a find)
  */
-CACHE_DECLARE(apr_status_t) cache_remove(cache_cache_t* c, void *entry);
+apr_status_t cache_remove(cache_cache_t* c, void *entry);
 #ifdef __cplusplus
 }
 #endif
index 2ac26ec8de7d3eec7dbc19fd82d05cf7edc30de3..202cf9f70c40665bddbafcd2eb9ad459bd23c13a 100644 (file)
@@ -80,7 +80,7 @@ static cache_hash_entry_t **alloc_array(cache_hash_t *ht, int max)
    return calloc(1, sizeof(*ht->array) * (max + 1));
 }
 
-CACHE_DECLARE(cache_hash_t *) cache_hash_make(apr_size_t size)
+cache_hash_t* cache_hash_make(apr_size_t size)
 {
     cache_hash_t *ht;
     ht = malloc(sizeof(cache_hash_t));
@@ -97,7 +97,7 @@ CACHE_DECLARE(cache_hash_t *) cache_hash_make(apr_size_t size)
     return ht;
 }
 
-CACHE_DECLARE(void) cache_hash_free(cache_hash_t *ht)
+void cache_hash_free(cache_hash_t *ht)
 {
     if (ht) {
         if (ht->array) {
@@ -110,7 +110,7 @@ CACHE_DECLARE(void) cache_hash_free(cache_hash_t *ht)
  * Hash iteration functions.
  */
 
-CACHE_DECLARE(cache_hash_index_t *) cache_hash_next(cache_hash_index_t *hi)
+cache_hash_index_t* cache_hash_next(cache_hash_index_t *hi)
 {
     hi->this = hi->next;
     while (!hi->this) {
@@ -122,7 +122,7 @@ CACHE_DECLARE(cache_hash_index_t *) cache_hash_next(cache_hash_index_t *hi)
     return hi;
 }
 
-CACHE_DECLARE(cache_hash_index_t *) cache_hash_first(cache_hash_t *ht)
+cache_hash_index_t* cache_hash_first(cache_hash_t *ht)
 {
     cache_hash_index_t *hi;
 
@@ -134,7 +134,7 @@ CACHE_DECLARE(cache_hash_index_t *) cache_hash_first(cache_hash_t *ht)
     return cache_hash_next(hi);
 }
 
-CACHE_DECLARE(void) cache_hash_this(cache_hash_index_t *hi,
+void cache_hash_this(cache_hash_index_t *hi,
                                   const void **key,
                                   apr_ssize_t *klen,
                                   void **val)
@@ -240,7 +240,7 @@ static cache_hash_entry_t **find_entry(cache_hash_t *ht,
     return hep;
 }
 
-CACHE_DECLARE(void *) cache_hash_get(cache_hash_t *ht,
+void* cache_hash_get(cache_hash_t *ht,
                                    const void *key,
                                    apr_ssize_t klen)
 {
@@ -252,7 +252,7 @@ CACHE_DECLARE(void *) cache_hash_get(cache_hash_t *ht,
         return NULL;
 }
 
-CACHE_DECLARE(void *) cache_hash_set(cache_hash_t *ht,
+void* cache_hash_set(cache_hash_t *ht,
                                      const void *key,
                                      apr_ssize_t klen,
                                      const void *val)
@@ -284,7 +284,7 @@ CACHE_DECLARE(void *) cache_hash_set(cache_hash_t *ht,
     return NULL;
 }
 
-CACHE_DECLARE(int) cache_hash_count(cache_hash_t *ht)
+int cache_hash_count(cache_hash_t *ht)
 {
     return ht->count;
 }
index 4138aca7f89c9a4167d0c7b2d280787b27d6a606..13a5eb4c319831871a2ad816ce57ccf69d6f7035 100644 (file)
@@ -59,7 +59,7 @@ typedef struct cache_hash_index_t cache_hash_index_t;
  * @param size 
  * @return The hash table just created
   */
-CACHE_DECLARE(cache_hash_t *) cache_hash_make(apr_size_t size);
+cache_hash_t* cache_hash_make(apr_size_t size);
 
 /**
  * Create a hash table.
@@ -70,7 +70,7 @@ CACHE_DECLARE(cache_hash_t *) cache_hash_make(apr_size_t size);
  *         not removed from the cache prior to calling cache_hash_free()
  *         will be unaccessable.
  */
-CACHE_DECLARE(void) cache_hash_free(cache_hash_t *ht);
+void cache_hash_free(cache_hash_t *ht);
 
 
 /**
@@ -82,7 +82,7 @@ CACHE_DECLARE(void) cache_hash_free(cache_hash_t *ht);
  * @remark If the value is NULL the hash entry is deleted.
  * @return The value of the deleted cache entry (so the caller can clean it up).
  */
-CACHE_DECLARE(void *) cache_hash_set(cache_hash_t *ht, const void *key,
+void* cache_hash_set(cache_hash_t *ht, const void *key,
                                      apr_ssize_t klen, const void *val);
 
 /**
@@ -92,7 +92,7 @@ CACHE_DECLARE(void *) cache_hash_set(cache_hash_t *ht, const void *key,
  * @param klen Length of the key. Can be CACHE_HASH_KEY_STRING to use the string length.
  * @return Returns NULL if the key is not present.
  */
-CACHE_DECLARE(void *) cache_hash_get(cache_hash_t *ht, const void *key,
+void* cache_hash_get(cache_hash_t *ht, const void *key,
                                    apr_ssize_t klen);
 
 /**
@@ -121,7 +121,7 @@ CACHE_DECLARE(void *) cache_hash_get(cache_hash_t *ht, const void *key,
  * progress at the same time.
  * </PRE>
   */
-CACHE_DECLARE(cache_hash_index_t *) cache_hash_first(cache_hash_t *ht);
+cache_hash_index_t* cache_hash_first(cache_hash_t *ht);
 
 /**
  * Continue iterating over the entries in a hash table.
@@ -129,7 +129,7 @@ CACHE_DECLARE(cache_hash_index_t *) cache_hash_first(cache_hash_t *ht);
  * @return a pointer to the updated iteration state.  NULL if there are no more  
  *         entries.
  */
-CACHE_DECLARE(cache_hash_index_t *) cache_hash_next(cache_hash_index_t *hi);
+cache_hash_index_t* cache_hash_next(cache_hash_index_t *hi);
 
 /**
  * Get the current entry's details from the iteration state.
@@ -140,7 +140,7 @@ CACHE_DECLARE(cache_hash_index_t *) cache_hash_next(cache_hash_index_t *hi);
  * @remark The return pointers should point to a variable that will be set to the
  *         corresponding data, or they may be NULL if the data isn't interesting.
  */
-CACHE_DECLARE(void) cache_hash_this(cache_hash_index_t *hi, const void **key, 
+void cache_hash_this(cache_hash_index_t *hi, const void **key, 
                                   apr_ssize_t *klen, void **val);
 
 /**
@@ -148,7 +148,7 @@ CACHE_DECLARE(void) cache_hash_this(cache_hash_index_t *hi, const void **key,
  * @param ht The hash table
  * @return The number of key/value pairs in the hash table.
  */
-CACHE_DECLARE(int) cache_hash_count(cache_hash_t *ht);
+int cache_hash_count(cache_hash_t *ht);
 
 
 /** @} */
index ba1653bfeeff6b2c92b5bc2cb5b9b416f4ff2bd5..40a1b34ed5e24285c5d16d051236890361c363b7 100644 (file)
@@ -104,18 +104,6 @@ PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).ma
 # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90"
 # Begin Source File
 
-SOURCE=.\cache_cache.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\cache_hash.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\cache_pqueue.c
-# End Source File
-# Begin Source File
-
 SOURCE=.\cache_storage.c
 # End Source File
 # Begin Source File
@@ -132,18 +120,6 @@ SOURCE=.\mod_cache.c
 # PROP Default_Filter "h;hpp;hxx;hm;inl"
 # Begin Source File
 
-SOURCE=.\cache_cache.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\cache_hash.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\cache_pqueue.h
-# End Source File
-# Begin Source File
-
 SOURCE=.\mod_cache.h
 # End Source File
 # End Group
index 003e4efcae7af905931cd7875b1c5616927a9d5e..7b8ebbb90797c1a342f6a6f410e790a911ecd437 100644 (file)
@@ -99,14 +99,46 @@ PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).ma
 
 # Name "mod_mem_cache - Win32 Release"
 # Name "mod_mem_cache - Win32 Debug"
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=.\cache_cache.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\cache_hash.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\cache_pqueue.h
+# End Source File
 # Begin Source File
 
 SOURCE=.\mod_cache.h
 # End Source File
+# End Group
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90"
+# Begin Source File
+
+SOURCE=.\cache_cache.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\cache_hash.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\cache_pqueue.c
+# End Source File
 # Begin Source File
 
 SOURCE=.\mod_mem_cache.c
 # End Source File
+# End Group
 # Begin Source File
 
 SOURCE=..\..\build\win32\httpd.rc