summaryrefslogtreecommitdiffstats
path: root/modules/freetype2/src/psnames/psmodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'modules/freetype2/src/psnames/psmodule.c')
-rw-r--r--modules/freetype2/src/psnames/psmodule.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/modules/freetype2/src/psnames/psmodule.c b/modules/freetype2/src/psnames/psmodule.c
index 01b85c3c8..8929ebe75 100644
--- a/modules/freetype2/src/psnames/psmodule.c
+++ b/modules/freetype2/src/psnames/psmodule.c
@@ -4,7 +4,7 @@
/* */
/* PSNames module implementation (body). */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -23,7 +23,21 @@
#include "psmodule.h"
+ /*
+ * The file `pstables.h' with its arrays and its function
+ * `ft_get_adobe_glyph_index' is useful for other projects also (for
+ * example, `pdfium' is using it). However, if used as a C++ header,
+ * including it in two different source files makes it necessary to use
+ * `extern const' for the declaration of its arrays, otherwise the data
+ * would be duplicated as mandated by the C++ standard.
+ *
+ * For this reason, we use `DEFINE_PS_TABLES' to guard the function
+ * definitions, and `DEFINE_PS_TABLES_DATA' to provide both proper array
+ * declarations and definitions.
+ */
+#include "pstables.h"
#define DEFINE_PS_TABLES
+#define DEFINE_PS_TABLES_DATA
#include "pstables.h"
#include "psnamerr.h"