This is done because user_free_hook needs to be
also used in mail_host. If it changes, this
reduces the places that need touching.
struct user *prev_insert_pos;
ARRAY(struct user_directory_iter *) iters;
- void (*user_free_hook)(struct user *);
+ user_free_hook_t *user_free_hook;
unsigned int timeout_secs;
/* If user's expire time is less than this many seconds away,
struct user_directory *
user_directory_init(unsigned int timeout_secs,
- void (*user_free_hook)(struct user *))
+ user_free_hook_t *user_free_hook)
{
struct user_directory *dir;
unsigned int weak:1;
};
+typedef void user_free_hook_t(struct user *);
+
/* Create a new directory. Users are dropped if their time gets older
than timeout_secs. */
struct user_directory *
user_directory_init(unsigned int timeout_secs,
- void (*user_free_hook)(struct user *));
+ user_free_hook_t *user_free_hook);
void user_directory_deinit(struct user_directory **dir);
/* Returns the number of users currently in directory. */