mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-21 10:28:09 +01:00
8410be8e08
In principle this could be done without depending on C++11 features, but these features should be available since gcc 4.8.1, and this localized usage is easy to replace if it turns out to be problematic for portability.
21 lines
351 B
C++
21 lines
351 B
C++
#include "notmuch-private.h"
|
|
|
|
#include <mutex>
|
|
|
|
static void do_init ()
|
|
{
|
|
/* Initialize the GLib type system and threads */
|
|
#if ! GLIB_CHECK_VERSION (2, 35, 1)
|
|
g_type_init ();
|
|
#endif
|
|
|
|
g_mime_init ();
|
|
_notmuch_filter_init ();
|
|
}
|
|
|
|
void
|
|
_notmuch_init ()
|
|
{
|
|
static std::once_flag initialized;
|
|
std::call_once (initialized, do_init);
|
|
}
|