| Index: third_party/harfbuzz-ng/src/hb-shaper-private.hh
|
| diff --git a/third_party/harfbuzz-ng/src/hb-shaper-private.hh b/third_party/harfbuzz-ng/src/hb-shaper-private.hh
|
| index d1d1146dad21060667ec259f00bed12f56a08085..381398a61710ecd8785b3e9df0eac12285c47189 100644
|
| --- a/third_party/harfbuzz-ng/src/hb-shaper-private.hh
|
| +++ b/third_party/harfbuzz-ng/src/hb-shaper-private.hh
|
| @@ -65,27 +65,31 @@ struct hb_shaper_data_t {
|
| #define HB_SHAPER_DATA_INVALID ((void *) -1)
|
| #define HB_SHAPER_DATA_IS_INVALID(data) ((void *) (data) == HB_SHAPER_DATA_INVALID)
|
|
|
| -#define HB_SHAPER_DATA_TYPE(shaper, object) struct hb_##shaper##_shaper_##object##_data_t
|
| +#define HB_SHAPER_DATA_TYPE_NAME(shaper, object) hb_##shaper##_shaper_##object##_data_t
|
| +#define HB_SHAPER_DATA_TYPE(shaper, object) struct HB_SHAPER_DATA_TYPE_NAME(shaper, object)
|
| #define HB_SHAPER_DATA_INSTANCE(shaper, object, instance) (* (HB_SHAPER_DATA_TYPE(shaper, object) **) &(instance)->shaper_data.shaper)
|
| -#define HB_SHAPER_DATA(shaper, object) HB_SHAPER_DATA_INSTANCE (shaper, object, object)
|
| +#define HB_SHAPER_DATA(shaper, object) HB_SHAPER_DATA_INSTANCE(shaper, object, object)
|
| #define HB_SHAPER_DATA_CREATE_FUNC(shaper, object) _hb_##shaper##_shaper_##object##_data_create
|
| #define HB_SHAPER_DATA_DESTROY_FUNC(shaper, object) _hb_##shaper##_shaper_##object##_data_destroy
|
| +#define HB_SHAPER_DATA_ENSURE_FUNC(shaper, object) hb_##shaper##_shaper_##object##_data_ensure
|
|
|
| #define HB_SHAPER_DATA_PROTOTYPE(shaper, object) \
|
| HB_SHAPER_DATA_TYPE (shaper, object); /* Type forward declaration. */ \
|
| extern "C" HB_INTERNAL HB_SHAPER_DATA_TYPE (shaper, object) * \
|
| HB_SHAPER_DATA_CREATE_FUNC (shaper, object) (hb_##object##_t *object HB_SHAPER_DATA_CREATE_FUNC_EXTRA_ARGS); \
|
| extern "C" HB_INTERNAL void \
|
| - HB_SHAPER_DATA_DESTROY_FUNC (shaper, object) (HB_SHAPER_DATA_TYPE (shaper, object) *data)
|
| + HB_SHAPER_DATA_DESTROY_FUNC (shaper, object) (HB_SHAPER_DATA_TYPE (shaper, object) *data); \
|
| + extern "C" HB_INTERNAL bool \
|
| + HB_SHAPER_DATA_ENSURE_FUNC (shaper, object) (hb_##object##_t *object)
|
|
|
| #define HB_SHAPER_DATA_DESTROY(shaper, object) \
|
| if (HB_SHAPER_DATA_TYPE (shaper, object) *data = HB_SHAPER_DATA (shaper, object)) \
|
| if (data != HB_SHAPER_DATA_INVALID && data != HB_SHAPER_DATA_SUCCEEDED) \
|
| HB_SHAPER_DATA_DESTROY_FUNC (shaper, object) (data);
|
|
|
| -#define HB_SHAPER_DATA_ENSURE_DECLARE(shaper, object) \
|
| -static inline bool \
|
| -hb_##shaper##_shaper_##object##_data_ensure (hb_##object##_t *object) \
|
| +#define HB_SHAPER_DATA_ENSURE_DEFINE(shaper, object) \
|
| +bool \
|
| +HB_SHAPER_DATA_ENSURE_FUNC(shaper, object) (hb_##object##_t *object) \
|
| {\
|
| retry: \
|
| HB_SHAPER_DATA_TYPE (shaper, object) *data = (HB_SHAPER_DATA_TYPE (shaper, object) *) hb_atomic_ptr_get (&HB_SHAPER_DATA (shaper, object)); \
|
|
|