summaryrefslogtreecommitdiff
path: root/src/hb-shaper-private.hh
diff options
context:
space:
mode:
authorAnas Nashif <anas.nashif@intel.com>2013-01-29 07:06:04 -0800
committerAnas Nashif <anas.nashif@intel.com>2013-01-29 07:06:04 -0800
commit9470543a71d47a3f2c27fc9dbb1e20d03b9cd56e (patch)
tree3e4c9a2e7e721c87c0478909bde9285106b0914d /src/hb-shaper-private.hh
parentbbb5fd4f2e0d0c8cbdd407a39e58de3b40971c52 (diff)
downloadharfbuzz-9470543a71d47a3f2c27fc9dbb1e20d03b9cd56e.tar.gz
harfbuzz-9470543a71d47a3f2c27fc9dbb1e20d03b9cd56e.tar.bz2
harfbuzz-9470543a71d47a3f2c27fc9dbb1e20d03b9cd56e.zip
Imported Upstream version 0.9.12upstream/0.9.12
Diffstat (limited to 'src/hb-shaper-private.hh')
-rw-r--r--src/hb-shaper-private.hh7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/hb-shaper-private.hh b/src/hb-shaper-private.hh
index 186318d..29c4493 100644
--- a/src/hb-shaper-private.hh
+++ b/src/hb-shaper-private.hh
@@ -29,8 +29,6 @@
#include "hb-private.hh"
-#include "hb-shape-plan.h" /* TODO remove */
-
typedef hb_bool_t hb_shape_func_t (hb_shape_plan_t *shape_plan,
hb_font_t *font,
hb_buffer_t *buffer,
@@ -97,7 +95,10 @@ hb_##shaper##_shaper_##object##_data_ensure (hb_##object##_t *object) \
if (unlikely (!data)) \
data = (HB_SHAPER_DATA_TYPE (shaper, object) *) HB_SHAPER_DATA_INVALID; \
if (!hb_atomic_ptr_cmpexch (&HB_SHAPER_DATA (shaper, object), NULL, data)) { \
- HB_SHAPER_DATA_DESTROY_FUNC (shaper, object) (data); \
+ if (data && \
+ data != HB_SHAPER_DATA_INVALID && \
+ data != HB_SHAPER_DATA_SUCCEEDED) \
+ HB_SHAPER_DATA_DESTROY_FUNC (shaper, object) (data); \
goto retry; \
} \
} \