Commit 073a4cefbdac04c6b74b097cbb39001a3232db9e

Werner Lemberg 2012-09-15T09:10:06

Use `FT_Module' instead of `FT_Library' argument in property funcs. This internal change simplifies access to global module data. * include/freetype/internal/services/svprop.h (FT_Properties_SetFunc, FT_Properties_GetFunc): Change accordingly. * src/base/ftobjs.c (ft_property_do), src/autofit/afmodule.c (af_property_set, af_property_get): Updated.

diff --git a/ChangeLog b/ChangeLog
index ec6ecf5..6d2a0a1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2012-09-15  Werner Lemberg  <wl@gnu.org>
+
+	Use `FT_Module' instead of `FT_Library' argument in property funcs.
+
+	This internal change simplifies access to global module data.
+
+	* include/freetype/internal/services/svprop.h
+	(FT_Properties_SetFunc, FT_Properties_GetFunc): Change accordingly.
+
+	* src/base/ftobjs.c (ft_property_do), src/autofit/afmodule.c
+	(af_property_set, af_property_get): Updated.
+
 2012-09-14  Werner Lemberg  <wl@gnu.org>
 
 	[autofit] Update to Unicode 6.1.0.
diff --git a/include/freetype/internal/services/svprop.h b/include/freetype/internal/services/svprop.h
index 4d40c1c..22da0bb 100644
--- a/include/freetype/internal/services/svprop.h
+++ b/include/freetype/internal/services/svprop.h
@@ -27,12 +27,12 @@ FT_BEGIN_HEADER
 
 
   typedef FT_Error
-  (*FT_Properties_SetFunc)( FT_Library   library,
+  (*FT_Properties_SetFunc)( FT_Module    module,
                             const char*  property_name,
                             const void*  value );
 
   typedef FT_Error
-  (*FT_Properties_GetFunc)( FT_Library   library,
+  (*FT_Properties_GetFunc)( FT_Module    module,
                             const char*  property_name,
                             void*        value );
 
diff --git a/src/autofit/afmodule.c b/src/autofit/afmodule.c
index 9231465..7e6a5dc 100644
--- a/src/autofit/afmodule.c
+++ b/src/autofit/afmodule.c
@@ -44,11 +44,11 @@
 
 
   FT_Error
-  af_property_set( FT_Library   library,
+  af_property_set( FT_Module    module,
                    const char*  property_name,
                    const void*  value )
   {
-    FT_UNUSED( library );
+    FT_UNUSED( module );
     FT_UNUSED( value );
 
     FT_TRACE0(( "af_property_get: missing property `%s'\n",
@@ -58,13 +58,13 @@
 
 
   FT_Error
-  af_property_get( FT_Library   library,
+  af_property_get( FT_Module    module,
                    const char*  property_name,
                    void*        value )
   {
     FT_Error  error = FT_Err_Ok;
 
-    FT_UNUSED( library );
+    FT_UNUSED( module );
 
 
     if ( !ft_strcmp( property_name, "glyph-to-script-map" ) )
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index 23af956..5a160ce 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -4456,8 +4456,8 @@
       return FT_Err_Unimplemented_Feature;
     }
 
-    return set ? service->set_property( library, property_name, value )
-               : service->get_property( library, property_name, value );
+    return set ? service->set_property( cur[0], property_name, value )
+               : service->get_property( cur[0], property_name, value );
   }