<<< Date Index >>>     <<< Thread Index >>>

Re: [RFC] header caching for MH (was: [RFC] header+body caching for POP)



Hi,

* Thomas Glanzmann [06-05-06 17:06:26 +0200] wrote:

Incidentally, is there any particular reason why the hcache
code uses (void *) all over the place as opposed to, e.g.,
(struct hcache *)?

yes it is. Because depending on the database backend you use with mutt
for hcache there is another type used. That is the idea behind this,
IIRC.

But in the header file hcache.h you can still use forward declarations without disclosing the contents of the structure as in:

  struct header_cache;

And as mutt_hcache_open() returns a pointer to an allocated structure of it, everything is fine. This would be different if we would open the cache like so:

    struct header_cache;
    mutt_hcache_open (&header_cache);

as the compiler needs the exact storage size at compile time.

  bye, Rocco
--
:wq!