提交 b8d6183e 编写于 作者: B Behdad Esfahbod

Use threadsafe set implementation for hb_language lookups

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.
上级 d37486d8
......@@ -28,6 +28,8 @@
#include "hb-private.hh"
#include "hb-mutex-private.hh"
HB_BEGIN_DECLS
......@@ -155,11 +157,11 @@ struct hb_language_item_t {
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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册