Daniel Kahn Gillmor <dkg@fifthhorseman.net> writes: > > I'm a little weirded out by the move to a static notmuch_database_t > *notmuch object. Are we doing this because we don't want to pass > around the database to internal functions? Yes > I know that the scope of nomtuch-show.c is basically "global scope", > but i worry that it makes the code more difficult to read and > maintain. > I agree it's not so nice with globals in general. > > Is it that much worse to pass around the notmuch_database_t *? > It has a lot of code impact, it really propagates to a lot of places. For instance it also impacts the json and text api, because those need to have the same signatures as the json api. Also the database needs to be opened in places where it's currently not opened, such as in notmuch_search_command(). I have started on such a patch and can certainly complete that if this is the direction we want to move. I can warn you that there is a lot of code changes (although they are cosmetic). /Johan _______________________________________________ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch