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,
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);
}
-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;
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;
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;
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;
* @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,
* 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
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));
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) {
* 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) {
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;
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)
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)
{
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)
return NULL;
}
-CACHE_DECLARE(int) cache_hash_count(cache_hash_t *ht)
+int cache_hash_count(cache_hash_t *ht)
{
return ht->count;
}
* @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.
* 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);
/**
* @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);
/**
* @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);
/**
* 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.
* @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.
* @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);
/**
* @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);
/** @} */
# 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
# 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
# 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