Thoughts on struct histopts

Alex Kiernan alexk at demon.net
Wed Jul 11 12:38:40 UTC 2001


I've defined this like this:

struct histopts {
    /* estimated size of database in key/value pairs during
     * creation */
    size_t npairs;

    /* how many history writes may be outstanding */
    size_t synccount;

    union {
	struct {
	    /* interval, in s, between stats of the history database
	     * for detecting a replacement, or 0 to disable (no
	     * checks); defaults to 0 */
	    time_t statinterval;
	} hisv6;
    } u;
};

I think the union's a mistake... I'm about to implement tagged hash as
a separate method (using the cpp hack suggested by Russ), suddenly I
need to alter every client to take account of an extra chunk in this
(if they care about such checks).

Anyone any thoughts on per method options, or just chuck the whole lot
into a flat structure (which is what I'm inclined to do right now).

-- 
Alex Kiernan, Principal Engineer, Development, Thus PLC


More information about the inn-workers mailing list