src/hb-coretext.cc | 4 ++-- src/hb-private.hh | 8 ++++++++ src/hb-uniscribe.cc | 4 ++-- 3 files changed, 12 insertions(+), 4 deletions(-)
New commits: commit 26a963b9cb4af3119177f277a2d48a5d537458fb Author: Behdad Esfahbod <[email protected]> Date: Sun Aug 10 18:04:50 2014 -0400 [wince] Try to fix some stuff on Windows CE Based on errors seen here: http://testresults.qt-project.org/ci/QtBase_dev_Integration/build_03837/wince70embedded-armv4i-msvc2008_Windows_7/log.txt.gz Fully untested. diff --git a/src/hb-private.hh b/src/hb-private.hh index 1b39e57..e97aab6 100644 --- a/src/hb-private.hh +++ b/src/hb-private.hh @@ -130,6 +130,14 @@ # define STRICT #endif +#ifdef _WIN32_WCE +/* Some things not defined on Windows CE. */ +#define MemoryBarrier() +#define getenv(Name) NULL +#define setlocale(Category, Locale) "C" +static int errno = 0; /* Use something better? */ +#endif + #if HAVE_ATEXIT /* atexit() is only safe to be called from shared libraries on certain * platforms. Whitelist. commit 92aeee3f040c2c32cbf70b27bd6954535388c870 Author: Behdad Esfahbod <[email protected]> Date: Sun Aug 10 17:42:19 2014 -0400 Minor diff --git a/src/hb-coretext.cc b/src/hb-coretext.cc index 72cba8c..844ad01 100644 --- a/src/hb-coretext.cc +++ b/src/hb-coretext.cc @@ -696,7 +696,7 @@ _hb_coretext_shape (hb_shape_plan_t *shape_plan, CFRange range = CTRunGetStringRange (run); buffer->ensure (buffer->len + range.length); - if (buffer->in_error) + if (unlikely (buffer->in_error)) FAIL ("Buffer resize failed"); hb_glyph_info_t *info = buffer->info + buffer->len; @@ -738,7 +738,7 @@ _hb_coretext_shape (hb_shape_plan_t *shape_plan, /* Needed buffer size in case we end up using scratch buffer. */ unsigned int alt_size = (sizeof (CGGlyph) + sizeof (CGPoint) + sizeof (CFIndex)) / sizeof (hb_glyph_info_t) + 2; buffer->ensure (MAX (buffer->len + num_glyphs, alt_size)); - if (buffer->in_error) + if (unlikely (buffer->in_error)) FAIL ("Buffer resize failed"); scratch = buffer->get_scratch_buffer (&scratch_size); diff --git a/src/hb-uniscribe.cc b/src/hb-uniscribe.cc index 0a2b481..f335351 100644 --- a/src/hb-uniscribe.cc +++ b/src/hb-uniscribe.cc @@ -904,7 +904,7 @@ retry: if (unlikely (hr == E_OUTOFMEMORY)) { buffer->ensure (buffer->allocated * 2); - if (buffer->in_error) + if (unlikely (buffer->in_error)) FAIL ("Buffer resize failed"); goto retry; } @@ -974,7 +974,7 @@ retry: #undef utf16_index buffer->ensure (glyphs_len); - if (buffer->in_error) + if (unlikely (buffer->in_error)) FAIL ("Buffer in error"); #undef FAIL _______________________________________________ HarfBuzz mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/harfbuzz
