diff --git a/src/hb-open-type-private.hh b/src/hb-open-type-private.hh index ef49ea912..e5bea3379 100644 --- a/src/hb-open-type-private.hh +++ b/src/hb-open-type-private.hh @@ -134,7 +134,13 @@ static inline Type& StructAfter(TObject &X) #define HB_NULL_POOL_SIZE 264 static_assert (HB_NULL_POOL_SIZE % sizeof (void *) == 0, "Align HB_NULL_POOL_SIZE."); -extern HB_INTERNAL const void * const _hb_NullPool[HB_NULL_POOL_SIZE / sizeof (void *)]; + +#ifdef HB_NO_VISIBILITY +static +#else +extern HB_INTERNAL +#endif +const void * const _hb_NullPool[HB_NULL_POOL_SIZE / sizeof (void *)]; /* Generic nul-content Null objects. */ template diff --git a/src/hb-ot-layout.cc b/src/hb-ot-layout.cc index 8ad36d225..4cf6c722c 100644 --- a/src/hb-ot-layout.cc +++ b/src/hb-ot-layout.cc @@ -40,7 +40,9 @@ #include "hb-ot-map-private.hh" +#ifndef HB_NO_VISIBILITY const void * const OT::_hb_NullPool[HB_NULL_POOL_SIZE / sizeof (void *)] = {}; +#endif hb_ot_layout_t * diff --git a/src/hb-private.hh b/src/hb-private.hh index 4a8d950d7..a516624a8 100644 --- a/src/hb-private.hh +++ b/src/hb-private.hh @@ -120,9 +120,7 @@ extern "C" void hb_free_impl(void *ptr); #endif #ifndef HB_INTERNAL -# ifdef __SUNPRO_CC -# define HB_INTERNAL __hidden -# elif !defined(__MINGW32__) && !defined(__CYGWIN__) +# if !defined(HB_NO_VISIBILITY) && !defined(__MINGW32__) && !defined(__CYGWIN__) # define HB_INTERNAL __attribute__((__visibility__("hidden"))) # else # define HB_INTERNAL