summaryrefslogtreecommitdiff
path: root/Build/source/libs/harfbuzz/harfbuzz-src
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2017-11-15 04:57:26 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2017-11-15 04:57:26 +0000
commit6a5dae5408627dd0a1b37272f939e18f6ff50424 (patch)
tree7034de9753204f7b9d6ae346fcf5a94763eebf20 /Build/source/libs/harfbuzz/harfbuzz-src
parent4b4ed766bfdfe3a5e18e1a7547d37f94383d6a6b (diff)
harfbuzz-1.7.1
git-svn-id: svn://tug.org/texlive/trunk@45817 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/harfbuzz/harfbuzz-src')
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/ChangeLog69
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/NEWS8
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/configure.ac2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-common.cc21
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ft.cc3
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-glib.cc3
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-icu.cc3
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-object-private.hh37
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-open-type-private.hh11
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-font.cc3
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ucdn.cc3
11 files changed, 103 insertions, 60 deletions
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/ChangeLog b/Build/source/libs/harfbuzz/harfbuzz-src/ChangeLog
index 7d2014f323c..c991bec062e 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/ChangeLog
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/ChangeLog
@@ -1,3 +1,72 @@
+commit f93c6f8bfa228e95311d8d6d02dcc64b603c6e36
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Nov 14 11:09:19 2017 -0800
+
+ 1.7.1
+
+ NEWS | 8 ++++++++
+ configure.ac | 2 +-
+ 2 files changed, 9 insertions(+), 1 deletion(-)
+
+commit 93f7c1652a05e806c2e3ac7edf498d2f4a508a3a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Nov 14 10:59:54 2017 -0800
+
+ Revert "[glib/ucdn/icu/ft/ot] Make returned funcs inert"
+
+ This reverts commit 5daf3bd4494cce6b4fb074533be9e99c4d9e0edd.
+
+ If other atexit callbacks try to destruct the objects we destruct
+ in atexit callbacks, bad things will happen.
+
+ I'll come up with some other way to catch premature destruction
+ of HB-owned objects.
+
+ Fixes https://github.com/behdad/harfbuzz/issues/618
+
+ src/hb-ft.cc | 3 ---
+ src/hb-glib.cc | 3 ---
+ src/hb-icu.cc | 3 ---
+ src/hb-object-private.hh | 37 ++++++-------------------------------
+ src/hb-ot-font.cc | 3 ---
+ src/hb-ucdn.cc | 3 ---
+ 6 files changed, 6 insertions(+), 46 deletions(-)
+
+commit c48475f33ab88be6664d41b039f7be7c3e56a5a7
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Nov 13 20:26:29 2017 -0800
+
+ Whitespace
+
+ src/hb-open-type-private.hh | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+commit 83d68027360ff655d3b59371fb606fc9e40df4ac
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Nov 13 20:25:02 2017 -0800
+
+ Clean up GlyphID
+
+ After 4a27c17ea0234dfe33e62f5830d9f92c26d48d30 we do not need
+ the special GlyphID.cmp(hb_codepoint_t), so just make GlyphID
+ a typedef.
+
+ Fixes https://github.com/behdad/harfbuzz/issues/612
+
+ src/hb-open-type-private.hh | 5 +----
+ 1 file changed, 1 insertion(+), 4 deletions(-)
+
+commit 7f39f576148643b4790fd70361e328b4b4da3149
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Nov 13 15:04:13 2017 -0800
+
+ Implement strtod_l() on MSVC
+
+ Patch from Jean Ghali on mailing list.
+
+ src/hb-common.cc | 21 +++++++++++++++------
+ 1 file changed, 15 insertions(+), 6 deletions(-)
+
commit e5d709889200571b62a611e0f44a410591983f8a
Author: Behdad Esfahbod <behdad@behdad.org>
Date: Mon Nov 13 09:42:37 2017 -0800
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/NEWS b/Build/source/libs/harfbuzz/harfbuzz-src/NEWS
index f3b7768b765..ba9a886682a 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/NEWS
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/NEWS
@@ -1,3 +1,11 @@
+Overview of changes leading to 1.7.1
+Tuesday, November 14, 2017
+====================================
+
+- Fix atexit object destruction regression.
+- Fix minor integer-overflow.
+
+
Overview of changes leading to 1.7.0
Monday, November 13, 2017
====================================
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/configure.ac b/Build/source/libs/harfbuzz/harfbuzz-src/configure.ac
index 8faf3410f47..7c3aa0336f7 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/configure.ac
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/configure.ac
@@ -1,6 +1,6 @@
AC_PREREQ([2.64])
AC_INIT([HarfBuzz],
- [1.7.0],
+ [1.7.1],
[https://github.com/behdad/harfbuzz/issues/new],
[harfbuzz],
[http://harfbuzz.org/])
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-common.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-common.cc
index 5c4a2c76fdd..92720d9e7d7 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-common.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-common.cc
@@ -699,34 +699,43 @@ parse_uint32 (const char **pp, const char *end, uint32_t *pv)
#if defined (HAVE_NEWLOCALE) && defined (HAVE_STRTOD_L)
#define USE_XLOCALE 1
+#define HB_LOCALE_T locale_t
+#define HB_CREATE_LOCALE(locName) newlocale (LC_ALL_MASK, locName, nullptr)
+#define HB_FREE_LOCALE(loc) freelocale (loc)
+#elif defined(_MSC_VER)
+#define USE_XLOCALE 1
+#define HB_LOCALE_T _locale_t
+#define HB_CREATE_LOCALE(locName) _create_locale (LC_ALL, locName)
+#define HB_FREE_LOCALE(loc) _free_locale (loc)
+#define strtod_l(a, b, c) _strtod_l ((a), (b), (c))
#endif
#ifdef USE_XLOCALE
-static locale_t C_locale;
+static HB_LOCALE_T C_locale;
#ifdef HB_USE_ATEXIT
static void
free_C_locale (void)
{
if (C_locale)
- freelocale (C_locale);
+ HB_FREE_LOCALE (C_locale);
}
#endif
-static locale_t
+static HB_LOCALE_T
get_C_locale (void)
{
retry:
- locale_t C = (locale_t) hb_atomic_ptr_get (&C_locale);
+ HB_LOCALE_T C = (HB_LOCALE_T) hb_atomic_ptr_get (&C_locale);
if (unlikely (!C))
{
- C = newlocale (LC_ALL_MASK, "C", nullptr);
+ C = HB_CREATE_LOCALE ("C");
if (!hb_atomic_ptr_cmpexch (&C_locale, nullptr, C))
{
- freelocale (C_locale);
+ HB_FREE_LOCALE (C_locale);
goto retry;
}
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ft.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ft.cc
index 68c77454716..0f15f8c3d0f 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ft.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ft.cc
@@ -423,7 +423,6 @@ static hb_font_funcs_t *static_ft_funcs = nullptr;
static
void free_static_ft_funcs (void)
{
- hb_object_undo_inert (static_ft_funcs);
hb_font_funcs_destroy (static_ft_funcs);
}
#endif
@@ -454,10 +453,8 @@ retry:
hb_font_funcs_set_glyph_from_name_func (funcs, hb_ft_get_glyph_from_name, nullptr, nullptr);
hb_font_funcs_make_immutable (funcs);
- hb_object_make_inert (funcs);
if (!hb_atomic_ptr_cmpexch (&static_ft_funcs, nullptr, funcs)) {
- hb_object_undo_inert (funcs);
hb_font_funcs_destroy (funcs);
goto retry;
}
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-glib.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-glib.cc
index 31de68e8644..50c30e9c7b9 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-glib.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-glib.cc
@@ -370,7 +370,6 @@ static hb_unicode_funcs_t *static_glib_funcs = nullptr;
static
void free_static_glib_funcs (void)
{
- hb_object_undo_inert (static_glib_funcs);
hb_unicode_funcs_destroy (static_glib_funcs);
}
#endif
@@ -391,10 +390,8 @@ retry:
#undef HB_UNICODE_FUNC_IMPLEMENT
hb_unicode_funcs_make_immutable (funcs);
- hb_object_make_inert (funcs);
if (!hb_atomic_ptr_cmpexch (&static_glib_funcs, nullptr, funcs)) {
- hb_object_undo_inert (funcs);
hb_unicode_funcs_destroy (funcs);
goto retry;
}
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-icu.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-icu.cc
index 44a198937b0..552eaeca51e 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-icu.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-icu.cc
@@ -351,7 +351,6 @@ static hb_unicode_funcs_t *static_icu_funcs = nullptr;
static
void free_static_icu_funcs (void)
{
- hb_object_undo_inert (static_icu_funcs);
hb_unicode_funcs_destroy (static_icu_funcs);
}
#endif
@@ -380,10 +379,8 @@ retry:
#undef HB_UNICODE_FUNC_IMPLEMENT
hb_unicode_funcs_make_immutable (funcs);
- hb_object_make_inert (funcs);
if (!hb_atomic_ptr_cmpexch (&static_icu_funcs, nullptr, funcs)) {
- hb_object_undo_inert (funcs);
hb_unicode_funcs_destroy (funcs);
goto retry;
}
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-object-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-object-private.hh
index 0dada492c94..baa1f8f05cc 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-object-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-object-private.hh
@@ -41,10 +41,9 @@
/* reference_count */
-#define HB_REFERENCE_COUNT_UNCHANGABLE_VALUE -0x53043
-#define HB_REFERENCE_COUNT_UNREFFABLE_VALUE -0x07734
-#define HB_REFERENCE_COUNT_UNTOUCHABLE_VALUE -0xBEDAD
-#define HB_REFERENCE_COUNT_INIT {HB_ATOMIC_INT_INIT (HB_REFERENCE_COUNT_UNCHANGABLE_VALUE)}
+#define HB_REFERENCE_COUNT_INERT_VALUE -1
+#define HB_REFERENCE_COUNT_POISON_VALUE -0x0000DEAD
+#define HB_REFERENCE_COUNT_INIT {HB_ATOMIC_INT_INIT(HB_REFERENCE_COUNT_INERT_VALUE)}
struct hb_reference_count_t
{
@@ -54,23 +53,9 @@ struct hb_reference_count_t
inline int get_unsafe (void) const { return ref_count.get_unsafe (); }
inline int inc (void) { return ref_count.inc (); }
inline int dec (void) { return ref_count.dec (); }
- inline void finish (void) { ref_count.set_unsafe (HB_REFERENCE_COUNT_UNTOUCHABLE_VALUE); }
-
- inline void make_inert (void)
- {
- if (get_unsafe () == HB_REFERENCE_COUNT_UNCHANGABLE_VALUE)
- return;
- ref_count.set_unsafe (HB_REFERENCE_COUNT_UNREFFABLE_VALUE);
- }
- inline void undo_inert (void)
- {
- if (get_unsafe () == HB_REFERENCE_COUNT_UNCHANGABLE_VALUE)
- return;
- assert (get_unsafe () == HB_REFERENCE_COUNT_UNREFFABLE_VALUE);
- ref_count.set_unsafe (1);
- }
-
- inline bool is_inert (void) const { return ref_count.get_unsafe () < 0; }
+ inline void finish (void) { ref_count.set_unsafe (HB_REFERENCE_COUNT_POISON_VALUE); }
+
+ inline bool is_inert (void) const { return ref_count.get_unsafe () == HB_REFERENCE_COUNT_INERT_VALUE; }
inline bool is_valid (void) const { return ref_count.get_unsafe () > 0; }
};
@@ -161,16 +146,6 @@ static inline bool hb_object_is_valid (const Type *obj)
return likely (obj->header.ref_count.is_valid ());
}
template <typename Type>
-static inline void hb_object_make_inert (Type *obj)
-{
- obj->header.ref_count.make_inert ();
-}
-template <typename Type>
-static inline void hb_object_undo_inert (Type *obj)
-{
- obj->header.ref_count.undo_inert ();
-}
-template <typename Type>
static inline Type *hb_object_reference (Type *obj)
{
hb_object_trace (obj, HB_FUNC);
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-open-type-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-open-type-private.hh
index 2687ba664fa..a12c4d2369c 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-open-type-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-open-type-private.hh
@@ -635,9 +635,9 @@ struct IntType
DEFINE_SIZE_STATIC (Size);
};
-typedef IntType<int8_t , 1> CHAR; /* 8-bit signed integer. */
-typedef IntType<uint8_t , 1> BYTE; /* 8-bit unsigned integer. */
-typedef IntType<int8_t , 1> INT8; /* 8-bit signed integer. */
+typedef IntType<int8_t, 1> CHAR; /* 8-bit signed integer. */
+typedef IntType<uint8_t, 1> BYTE; /* 8-bit unsigned integer. */
+typedef IntType<int8_t, 1> INT8; /* 8-bit signed integer. */
typedef IntType<uint16_t, 2> USHORT; /* 16-bit unsigned integer. */
typedef IntType<int16_t, 2> SHORT; /* 16-bit signed integer. */
typedef IntType<uint32_t, 4> ULONG; /* 32-bit unsigned integer. */
@@ -697,10 +697,7 @@ struct Tag : ULONG
DEFINE_NULL_DATA (Tag, " ");
/* Glyph index number, same as uint16 (length = 16 bits) */
-struct GlyphID : USHORT {
- static inline int cmp (const GlyphID *a, const GlyphID *b) { return b->USHORT::cmp (*a); }
- inline int cmp (hb_codepoint_t a) const { return (int) a - (int) *this; }
-};
+typedef USHORT GlyphID;
/* Script/language-system/feature index */
struct Index : USHORT {
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-font.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-font.cc
index 72d3c583618..47416012c9d 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-font.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-font.cc
@@ -663,7 +663,6 @@ static hb_font_funcs_t *static_ot_funcs = nullptr;
static
void free_static_ot_funcs (void)
{
- hb_object_undo_inert (static_ot_funcs);
hb_font_funcs_destroy (static_ot_funcs);
}
#endif
@@ -694,10 +693,8 @@ retry:
hb_font_funcs_set_glyph_from_name_func (funcs, hb_ot_get_glyph_from_name, nullptr, nullptr);
hb_font_funcs_make_immutable (funcs);
- hb_object_make_inert (funcs);
if (!hb_atomic_ptr_cmpexch (&static_ot_funcs, nullptr, funcs)) {
- hb_object_undo_inert (funcs);
hb_font_funcs_destroy (funcs);
goto retry;
}
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ucdn.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ucdn.cc
index 99266724fbf..9515bda2567 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ucdn.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ucdn.cc
@@ -237,7 +237,6 @@ static hb_unicode_funcs_t *static_ucdn_funcs = nullptr;
static
void free_static_ucdn_funcs (void)
{
- hb_object_undo_inert (static_ucdn_funcs);
hb_unicode_funcs_destroy (static_ucdn_funcs);
}
#endif
@@ -259,10 +258,8 @@ retry:
#undef HB_UNICODE_FUNC_IMPLEMENT
hb_unicode_funcs_make_immutable (funcs);
- hb_object_make_inert (funcs);
if (!hb_atomic_ptr_cmpexch (&static_ucdn_funcs, nullptr, funcs)) {
- hb_object_undo_inert (funcs);
hb_unicode_funcs_destroy (funcs);
goto retry;
}