diff options
Diffstat (limited to 'src/3rdparty/harfbuzz-ng/src/hb-common.cc')
-rw-r--r-- | src/3rdparty/harfbuzz-ng/src/hb-common.cc | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/src/3rdparty/harfbuzz-ng/src/hb-common.cc b/src/3rdparty/harfbuzz-ng/src/hb-common.cc index 416d082a6b..1516211e96 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-common.cc +++ b/src/3rdparty/harfbuzz-ng/src/hb-common.cc @@ -33,10 +33,6 @@ #include <locale.h> -#ifdef _WIN32_WCE -#define strdup(x) _strdup(x) -#endif - /* hb_options_t */ @@ -61,7 +57,7 @@ _hb_options_init (void) /** * hb_tag_from_string: - * @str: (array length=len): + * @str: (array length=len) (element-type uint8_t): * @len: * * @@ -119,7 +115,7 @@ const char direction_strings[][4] = { /** * hb_direction_from_string: - * @str: (array length=len): + * @str: (array length=len) (element-type uint8_t): * @len: * * @@ -238,8 +234,8 @@ struct hb_language_item_t { static hb_language_item_t *langs; -#ifdef HAVE_ATEXIT -static inline +#ifdef HB_USE_ATEXIT +static void free_langs (void) { while (langs) { @@ -269,11 +265,12 @@ retry: *lang = key; if (!hb_atomic_ptr_cmpexch (&langs, first_lang, lang)) { + lang->finish (); free (lang); goto retry; } -#ifdef HAVE_ATEXIT +#ifdef HB_USE_ATEXIT if (!first_lang) atexit (free_langs); /* First person registers atexit() callback. */ #endif @@ -284,7 +281,7 @@ retry: /** * hb_language_from_string: - * @str: (array length=len): + * @str: (array length=len) (element-type uint8_t): * @len: * * @@ -349,7 +346,7 @@ hb_language_get_default (void) hb_language_t language = (hb_language_t) hb_atomic_ptr_get (&default_language); if (unlikely (language == HB_LANGUAGE_INVALID)) { language = hb_language_from_string (setlocale (LC_CTYPE, NULL), -1); - hb_atomic_ptr_cmpexch (&default_language, HB_LANGUAGE_INVALID, language); + (void) hb_atomic_ptr_cmpexch (&default_language, HB_LANGUAGE_INVALID, language); } return default_language; @@ -404,7 +401,7 @@ hb_script_from_iso15924_tag (hb_tag_t tag) /** * hb_script_from_string: - * @s: (array length=len): + * @s: (array length=len) (element-type uint8_t): * @len: * * |