[HarfBuzz] harfbuzz-ng: Branch 'master'
Behdad Esfahbod
behdad at kemper.freedesktop.org
Thu Apr 22 07:26:59 PDT 2010
src/hb-open-type-private.hh | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
New commits:
commit 565c80bd2960366ace2d10dd71beaaf2a80213c8
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Thu Apr 22 10:26:35 2010 -0400
Make sure semicolon is expected after DEFINE_NULL_DATA()
diff --git a/src/hb-open-type-private.hh b/src/hb-open-type-private.hh
index ba1bf0e..de5b165 100644
--- a/src/hb-open-type-private.hh
+++ b/src/hb-open-type-private.hh
@@ -82,11 +82,12 @@ static inline const Type& Null () {
/* Specializaiton for arbitrary-content arbitrary-sized Null objects. */
#define DEFINE_NULL_DATA(Type, size, data) \
-static const char _Null##Type[size + 1] = data; \
+static const char _Null##Type[size + 1] = data; /* +1 is for nul-termination in data */ \
template <> \
inline const Type& Null<Type> () { \
return CONST_CAST (Type, *_Null##Type, 0); \
-}
+} /* The following line really exists such that we end in a place needing semicolon */ \
+ASSERT_STATIC (sizeof (Type) + 1 <= sizeof (_Null##Type))
/* Accessor macro. */
#define Null(Type) Null<Type>()
More information about the HarfBuzz
mailing list