[HarfBuzz] harfbuzz: Branch 'master'
Behdad Esfahbod
behdad at kemper.freedesktop.org
Thu May 24 22:59:58 UTC 2018
src/Makefile.sources | 1 +
src/dump-emoji.cc | 8 +-------
src/dump-fon.cc | 6 +-----
src/hb-ot-layout.cc | 6 ------
src/hb-static.cc | 32 ++++++++++++++++++++++++++++++++
src/hb-subset.cc | 5 ++---
src/main.cc | 6 +-----
7 files changed, 38 insertions(+), 26 deletions(-)
New commits:
commit fd3d0042319c33c923a60d435779bf7ed5a9a6f5
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Thu May 24 15:58:26 2018 -0700
Move pool definitions to hb-static.cc
diff --git a/src/Makefile.sources b/src/Makefile.sources
index 9fbb71e9..2304f308 100644
--- a/src/Makefile.sources
+++ b/src/Makefile.sources
@@ -44,6 +44,7 @@ HB_BASE_sources = \
hb-shaper-impl-private.hh \
hb-shaper-private.hh \
hb-shaper.cc \
+ hb-static.cc \
hb-string-array.hh \
hb-unicode-private.hh \
hb-unicode.cc \
diff --git a/src/dump-emoji.cc b/src/dump-emoji.cc
index dc8f83d2..99e8ef9f 100644
--- a/src/dump-emoji.cc
+++ b/src/dump-emoji.cc
@@ -22,8 +22,7 @@
* PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
*/
-#include "hb.h"
-#include "hb-private.hh"
+#include "hb-static.cc"
#include "hb-ot-color-cbdt-table.hh"
#include "hb-ot-color-colr-table.hh"
#include "hb-ot-color-cpal-table.hh"
@@ -46,11 +45,6 @@
#include <stdlib.h>
#include <stdio.h>
-#ifndef HB_NO_VISIBILITY
-void * const _hb_NullPool[HB_NULL_POOL_SIZE / sizeof (void *)] = {};
-thread_local void * _hb_CrapPool[HB_NULL_POOL_SIZE / sizeof (void *)] = {};
-#endif
-
void cbdt_callback (const uint8_t* data, unsigned int length,
unsigned int group, unsigned int gid)
{
diff --git a/src/dump-fon.cc b/src/dump-fon.cc
index db96790a..43d0ab06 100644
--- a/src/dump-fon.cc
+++ b/src/dump-fon.cc
@@ -22,15 +22,11 @@
* PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
*/
+#include "hb-static.cc"
#include <stdio.h>
#include <stdlib.h>
#include "hb-open-type-private.hh"
-#ifndef HB_NO_VISIBILITY
-void * const _hb_NullPool[HB_NULL_POOL_SIZE / sizeof (void *)] = {};
-thread_local void * _hb_CrapPool[HB_NULL_POOL_SIZE / sizeof (void *)] = {};
-#endif
-
template <typename Type, int Bytes> struct LEInt;
template <typename Type>
diff --git a/src/hb-ot-layout.cc b/src/hb-ot-layout.cc
index 6cb24eaf..e3b80b2a 100644
--- a/src/hb-ot-layout.cc
+++ b/src/hb-ot-layout.cc
@@ -46,12 +46,6 @@
#include "hb-ot-name-table.hh"
-#ifndef HB_NO_VISIBILITY
-void * const _hb_NullPool[HB_NULL_POOL_SIZE / sizeof (void *)] = {};
-thread_local void * _hb_CrapPool[HB_NULL_POOL_SIZE / sizeof (void *)] = {};
-#endif
-
-
hb_ot_layout_t *
_hb_ot_layout_create (hb_face_t *face)
{
diff --git a/src/hb-static.cc b/src/hb-static.cc
new file mode 100644
index 00000000..e60121dd
--- /dev/null
+++ b/src/hb-static.cc
@@ -0,0 +1,32 @@
+/*
+ * Copyright © 2018 Google, Inc.
+ *
+ * This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Google Author(s): Behdad Esfahbod
+ */
+
+#include "hb-private.hh"
+
+#ifndef HB_NO_VISIBILITY
+void * const _hb_NullPool[HB_NULL_POOL_SIZE / sizeof (void *)] = {};
+thread_local void * _hb_CrapPool[HB_NULL_POOL_SIZE / sizeof (void *)] = {};
+#endif
diff --git a/src/hb-subset.cc b/src/hb-subset.cc
index 94d65156..2bbc4bf6 100644
--- a/src/hb-subset.cc
+++ b/src/hb-subset.cc
@@ -44,9 +44,8 @@
#include "hb-ot-post-table.hh"
-#if !defined(HB_NO_VISIBILITY) && !defined(HB_SUBSET_BUILTIN)
-void * const _hb_NullPool[HB_NULL_POOL_SIZE / sizeof (void *)] = {};
-thread_local void * _hb_CrapPool[HB_NULL_POOL_SIZE / sizeof (void *)] = {};
+#if !defined(HB_SUBSET_BUILTIN)
+#include "hb-static.cc"
#endif
diff --git a/src/main.cc b/src/main.cc
index 88625b4c..514e34db 100644
--- a/src/main.cc
+++ b/src/main.cc
@@ -24,6 +24,7 @@
* Red Hat Author(s): Behdad Esfahbod
*/
+#include "hb-static.cc"
#include "hb-open-file-private.hh"
#include "hb-ot-layout-gdef-table.hh"
#include "hb-ot-layout-gsubgpos-private.hh"
@@ -37,11 +38,6 @@
using namespace OT;
-#ifndef HB_NO_VISIBILITY
-void * const _hb_NullPool[HB_NULL_POOL_SIZE / sizeof (void *)] = {};
-thread_local void * _hb_CrapPool[HB_NULL_POOL_SIZE / sizeof (void *)] = {};
-#endif
-
int
main (int argc, char **argv)
{
More information about the HarfBuzz
mailing list