diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2018-09-11 04:13:36 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2018-09-11 04:13:36 +0000 |
commit | 683672628fe7bb6a6c5e71735942eb1b5fcae0a6 (patch) | |
tree | b01fc67059d533445d1bc8826f03c5055af389c2 /Build/source/libs/harfbuzz/harfbuzz-src/src/hb-null.hh | |
parent | c9d2cebb0c8eac1a2f3f6aac9031c9957cf956aa (diff) |
harfbuzz 1.9.0
git-svn-id: svn://tug.org/texlive/trunk@48641 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/harfbuzz/harfbuzz-src/src/hb-null.hh')
-rw-r--r-- | Build/source/libs/harfbuzz/harfbuzz-src/src/hb-null.hh | 45 |
1 files changed, 29 insertions, 16 deletions
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-null.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-null.hh index 91efee6443d..7128f0a94f3 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-null.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-null.hh @@ -27,7 +27,7 @@ #ifndef HB_NULL_HH #define HB_NULL_HH -#include "hb-private.hh" +#include "hb.hh" /* @@ -51,27 +51,40 @@ static inline Type const & Null (void) { /* Specializaitons for arbitrary-content Null objects expressed in bytes. */ #define DECLARE_NULL_NAMESPACE_BYTES(Namespace, Type) \ -} /* Close namespace. */ \ -extern HB_INTERNAL const unsigned char _hb_Null_##Namespace##_##Type[Namespace::Type::min_size]; \ -template <> \ -/*static*/ inline const Namespace::Type& Null<Namespace::Type> (void) { \ - return *reinterpret_cast<const Namespace::Type *> (_hb_Null_##Namespace##_##Type); \ -} \ -namespace Namespace { \ -static_assert (true, "Just so we take semicolon after.") + } /* Close namespace. */ \ + extern HB_INTERNAL const unsigned char _hb_Null_##Namespace##_##Type[Namespace::Type::min_size]; \ + template <> \ + /*static*/ inline const Namespace::Type& Null<Namespace::Type> (void) { \ + return *reinterpret_cast<const Namespace::Type *> (_hb_Null_##Namespace##_##Type); \ + } \ + namespace Namespace { \ + static_assert (true, "Just so we take semicolon after.") #define DEFINE_NULL_NAMESPACE_BYTES(Namespace, Type) \ -const unsigned char _hb_Null_##Namespace##_##Type[Namespace::Type::min_size] + const unsigned char _hb_Null_##Namespace##_##Type[Namespace::Type::min_size] /* Specializaitons for arbitrary-content Null objects expressed as struct initializer. */ #define DECLARE_NULL_INSTANCE(Type) \ -extern HB_INTERNAL const Type _hb_Null_##Type; \ -template <> \ -/*static*/ inline const Type& Null<Type> (void) { \ - return _hb_Null_##Type; \ -} \ + extern HB_INTERNAL const Type _hb_Null_##Type; \ + template <> \ + /*static*/ inline const Type& Null<Type> (void) { \ + return _hb_Null_##Type; \ + } \ static_assert (true, "Just so we take semicolon after.") #define DEFINE_NULL_INSTANCE(Type) \ -const Type _hb_Null_##Type + const Type _hb_Null_##Type + +/* Specializaiton to disallow Null objects. */ +#define DECLARE_NULL_DISALLOW(Type) \ + template <> inline const Type& Null<Type> (void) +#define DECLARE_NULL_NAMSPACE_DISALLOW(Namespace, Type) \ + } /* Close namespace. */ \ + template <> \ + /*static*/ inline const Namespace::Type& Null<Namespace::Type> (void) { \ + extern void *_hb_undefined; \ + return *reinterpret_cast<const Namespace::Type *> (_hb_undefined); \ + } \ + namespace Namespace { \ + static_assert (true, "Just so we take semicolon after.") /* Global writable pool. Enlarge as necessary. */ |