From b686ea2b16d821bd79545875cee7dbe845a47641 Mon Sep 17 00:00:00 2001 From: "William A. Rowe Jr" Date: Sun, 13 Oct 2002 19:35:04 +0000 Subject: [PATCH] Temporary fix for the len type discrepancy, with documentation to be fixed. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97195 13f79535-47bb-0310-9956-ffa450edef68 --- modules/experimental/mod_cache.h | 7 +++++++ modules/experimental/mod_disk_cache.c | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/modules/experimental/mod_cache.h b/modules/experimental/mod_cache.h index d98ba3edf5c..159414a5bad 100644 --- a/modules/experimental/mod_cache.h +++ b/modules/experimental/mod_cache.h @@ -206,6 +206,13 @@ struct cache_info { }; /* cache handle information */ + +/* XXX TODO On the next structure change/MMN bump, + * count must become an apr_off_t, representing + * the potential size of disk cached objects. + * Then dig for + * "XXX Bad Temporary Cast - see cache_object_t notes" + */ typedef struct cache_object cache_object_t; struct cache_object { char *key; diff --git a/modules/experimental/mod_disk_cache.c b/modules/experimental/mod_disk_cache.c index 2accbdc9986..a3c002e7f3e 100644 --- a/modules/experimental/mod_disk_cache.c +++ b/modules/experimental/mod_disk_cache.c @@ -338,7 +338,8 @@ static int create_entity(cache_handle_t *h, request_rec *r, obj->vobj = dobj = apr_pcalloc(r->pool, sizeof(*dobj)); obj->key = apr_pstrdup(r->pool, key); - obj->info.len = len; + /* XXX Bad Temporary Cast - see cache_object_t notes */ + obj->info.len = (apr_size_t) len; obj->complete = 0; /* Cache object is not complete */ dobj->name = obj->key; -- 2.47.2