[HarfBuzz] harfbuzz-ng: Branch 'master' - 2 commits
Behdad Esfahbod
behdad at kemper.freedesktop.org
Mon Apr 26 06:36:45 PDT 2010
configure.ac | 2 --
src/hb-open-file-private.hh | 1 -
src/hb-open-type-private.hh | 8 ++++----
src/hb-private.h | 4 ----
4 files changed, 4 insertions(+), 11 deletions(-)
New commits:
commit 66d6eb30eb0b8d61e00f86ea0c7829abaddb52fa
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Sun Apr 25 23:01:45 2010 -0400
Rename Var to Obj
diff --git a/src/hb-open-type-private.hh b/src/hb-open-type-private.hh
index 106af0c..258a462 100644
--- a/src/hb-open-type-private.hh
+++ b/src/hb-open-type-private.hh
@@ -265,10 +265,10 @@ _hb_sanitize_edit (SANITIZE_ARG_DEF,
#define SANITIZE_ARRAY(A,S,L) HB_LIKELY (_hb_sanitize_array (SANITIZE_ARG, CharP(A), S, L))
-#define NEUTER(Var, Val) \
- (SANITIZE_OBJ (Var) && \
- _hb_sanitize_edit (SANITIZE_ARG, CharP(&(Var)), (Var).get_size ()) && \
- ((Var).set (Val), true))
+#define NEUTER(Obj, Val) \
+ (SANITIZE_OBJ (Obj) && \
+ _hb_sanitize_edit (SANITIZE_ARG, CharP(&(Obj)), (Obj).get_size ()) && \
+ ((Obj).set (Val), true))
/* Template to sanitize an object. */
commit 690b9194619589c32ffc0c092e45262ae7776e79
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Sun Apr 25 22:51:05 2010 -0400
Remove use of flexible arrays
Also remove wrong ASSERT_SIZE that would trigger only when not using
flexible arrays (which was the case on win32, but not with gcc).
diff --git a/configure.ac b/configure.ac
index f9ca23b..0cc01b7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11,8 +11,6 @@ AC_PROG_LIBTOOL dnl ([1.4]) Don't remove!
AC_PROG_CC
AC_PROG_CXX
-AC_C_FLEXIBLE_ARRAY_MEMBER
-
AC_CHECK_FUNCS(mprotect sysconf getpagesize)
AC_CHECK_HEADERS(unistd.h sys/mman.h)
diff --git a/src/hb-open-file-private.hh b/src/hb-open-file-private.hh
index a3efaf1..83f6571 100644
--- a/src/hb-open-file-private.hh
+++ b/src/hb-open-file-private.hh
@@ -241,7 +241,6 @@ struct OpenTypeFontFile
TTCHeader ttcHeader[VAR];
} u;
};
-ASSERT_SIZE (OpenTypeFontFile, 4);
#endif /* HB_OPEN_FILE_PRIVATE_HH */
diff --git a/src/hb-private.h b/src/hb-private.h
index 0f3484e..b33d629 100644
--- a/src/hb-private.h
+++ b/src/hb-private.h
@@ -82,11 +82,7 @@
#define ASSERT_SIZE(_type, _size) ASSERT_STATIC (sizeof (_type) == (_size))
/* Size signifying variable-sized array */
-#ifdef FLEXIBLE_ARRAY_MEMBER
-#define VAR FLEXIBLE_ARRAY_MEMBER
-#else
#define VAR 1
-#endif
#define VAR0 (VAR+0)
#define ASSERT_SIZE_VAR(_type, _size, _var_type) \
More information about the HarfBuzz
mailing list