summaryrefslogtreecommitdiffstats
path: root/src/psnames/psmodule.c
diff options
context:
space:
mode:
authorEric Vannier <evannier@google.com>2012-03-22 16:08:33 -0700
committerGeremy Condra <gcondra@google.com>2012-04-20 14:53:55 -0700
commit41371e1e39c8528eb0c4bc40683c736e6683e60c (patch)
treeba563af45d79cd0832305fe3833919bb2475f186 /src/psnames/psmodule.c
parent27811904d8de0ce5591417812ca31163bf5aad60 (diff)
downloadandroid_external_freetype-41371e1e39c8528eb0c4bc40683c736e6683e60c.tar.gz
android_external_freetype-41371e1e39c8528eb0c4bc40683c736e6683e60c.tar.bz2
android_external_freetype-41371e1e39c8528eb0c4bc40683c736e6683e60c.zip
Update to freetype 2.4.9
This was done by applying the entire 2.4.9 except for the following exceptions: - files that were new, or were not present originally in the version of freetype we were using (meaning that they are present in 2.4.8, and in 2.4.9, but were never integrated into the Android tree because they are not used in the Android tree). - ftmodule.h: given that we support fewer modules than in upstream 2.4.9 (same as Android), the file was left unchanged (and there were no changes from the official 2.4.8 to 2.4.9 - ftoption.h: same reasons as ftmodule.h Change-Id: Id251f2cc5ca1c864f9a4cc0c67b94025ee3ccc4a
Diffstat (limited to 'src/psnames/psmodule.c')
-rw-r--r--src/psnames/psmodule.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/psnames/psmodule.c b/src/psnames/psmodule.c
index 7528696..3619174 100644
--- a/src/psnames/psmodule.c
+++ b/src/psnames/psmodule.c
@@ -521,7 +521,7 @@
#ifdef FT_CONFIG_OPTION_ADOBE_GLYPH_LIST
- FT_DEFINE_SERVICE_PSCMAPSREC(pscmaps_interface,
+ FT_DEFINE_SERVICE_PSCMAPSREC(pscmaps_interface,
(PS_Unicode_ValueFunc) ps_unicode_value,
(PS_Unicodes_InitFunc) ps_unicodes_init,
(PS_Unicodes_CharIndexFunc)ps_unicodes_char_index,
@@ -536,7 +536,7 @@
#else
- FT_DEFINE_SERVICE_PSCMAPSREC(pscmaps_interface,
+ FT_DEFINE_SERVICE_PSCMAPSREC(pscmaps_interface,
0,
0,
0,
@@ -552,7 +552,7 @@
#endif /* FT_CONFIG_OPTION_ADOBE_GLYPH_LIST */
- FT_DEFINE_SERVICEDESCREC1(pscmaps_services,
+ FT_DEFINE_SERVICEDESCREC1(pscmaps_services,
FT_SERVICE_ID_POSTSCRIPT_CMAPS, &FT_PSCMAPS_INTERFACE_GET
)
@@ -563,7 +563,19 @@
psnames_get_service( FT_Module module,
const char* service_id )
{
+ /* FT_PSCMAPS_SERVICES_GET derefers `library' in PIC mode */
+#ifdef FT_CONFIG_OPTION_PIC
+ FT_Library library;
+
+
+ if ( !module )
+ return NULL;
+ library = module->library;
+ if ( !library )
+ return NULL;
+#else
FT_UNUSED( module );
+#endif
return ft_service_list_lookup( FT_PSCMAPS_SERVICES_GET, service_id );
}
@@ -578,7 +590,7 @@
#endif
FT_DEFINE_MODULE(psnames_module_class,
-
+
0, /* this is not a font driver, nor a renderer */
sizeof ( FT_ModuleRec ),