Note that the static variable has to be a global static, as gcc
implements local statics differently and that would require linking
to libstdc++, which we don't want.
#include "hb-private.hh"
+#include "hb-mutex-private.hh"
+
HB_BEGIN_DECLS
void finish (void) { free (lang); }
};
+static hb_threadsafe_set_t<hb_language_item_t> langs;
+
hb_language_t
hb_language_from_string (const char *str)
{
- static hb_set_t<hb_language_item_t> langs;
-
if (!str || !*str)
return NULL;