datastore.h

David Relson relson at osagesoftware.com
Wed Jan 8 06:18:56 CET 2003


At 12:06 AM 1/8/03, Gyepi SAM wrote:

>Hi,
>
>I just realized that datastore.h has now been split
>up into datastore.h and datastore_db.h, but everything in
>datastore_db.h should be in datastore.h since datastore.h presents
>the API for implementing a database independent datastore.
>
>While we happen to be using BDB now, there's no reason why we could not 
>switch or
>offer alternatives in the future. In fact, I am now investigating tdb 
>(http://tdb.sf.net),
>which was recommended by a list member. Thanks Yusuf!
>
>Unless there's some compelling reason not to, I'd like to combine the
>two files...

Looking at datastore_db.h, it seems to mix datastore dependent and 
datastore independent info.  Certainly, dbv_t and db_setvalue_and_date() 
are independent.  dbh_t looks dependent with its use of DB.  pid, locked, 
and is_swapped also look dependent.

If you move the dbv_t and db_setvalue_and_date declarations to datastore.h, 
then I suspect there should be very few files that know about datastore_db.h

Also, MSG_COUNT_TOK probably belongs in common.h along with MAXTOKENLEN 
(since they're both token related).





More information about the bogofilter-dev mailing list