Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37388432
en ru br
ALT Linux repositórios
S:2.8.0-alt7

Group :: Sistema/Bibliotecas
RPM: libfreetype-infinality

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

Patch: freetype-2.8.0-alt-ft_done_mm_var.patch
Download


diff --git a/freetype/include/freetype/ftmm.h b/freetype/include/freetype/ftmm.h
index c41b80e..b1c7f8c 100644
--- a/freetype/include/freetype/ftmm.h
+++ b/freetype/include/freetype/ftmm.h
@@ -285,7 +285,7 @@ FT_BEGIN_HEADER
   /* <Output>                                                              */
   /*    amaster :: The variation descriptor.                               */
   /*               Allocates a data structure, which the user must         */
-  /*               deallocate with `free' after use.                       */
+  /*               deallocate with a call to @FT_Done_MM_Var after use     */
   /*                                                                       */
   /* <Return>                                                              */
   /*    FreeType error code.  0~means success.                             */
@@ -294,6 +294,24 @@ FT_BEGIN_HEADER
   FT_Get_MM_Var( FT_Face      face,
                  FT_MM_Var*  *amaster );
 
+/*************************************************************************/
+/*                                                                       */
+/* <Function>                                                            */
+/*    FT_Done_MM_Var                                                     */
+/*                                                                       */
+/* <Description>                                                         */
+/*    Free the memory allocated by @FT_Get_MM_Var.                       */
+/*                                                                       */
+/* <Input>                                                               */
+/*    library :: A handle of the face's parent library object that was   */
+/*               used in the call to @FT_Get_MM_Var to create `amaster'. */
+/*                                                                       */
+/* <Return>                                                              */
+/*    FreeType error code.  0~means success.                             */
+/*                                                                       */
+FT_EXPORT( FT_Error )
+FT_Done_MM_Var( FT_Library   library,
+                FT_MM_Var   *amaster );
 
   /*************************************************************************/
   /*                                                                       */
diff --git a/freetype/src/base/ftmm.c b/freetype/src/base/ftmm.c
index 2cb56a3..9a3f12e 100644
--- a/freetype/src/base/ftmm.c
+++ b/freetype/src/base/ftmm.c
@@ -144,6 +144,23 @@
     return error;
   }
 
+  /* documentation is in ftmm.h */
+
+  FT_EXPORT_DEF( FT_Error )
+  FT_Done_MM_Var( FT_Library  library,
+                  FT_MM_Var*  amaster )
+  {
+    FT_Memory  memory;
+
+
+    if ( !library )
+      return FT_THROW( Invalid_Library_Handle );
+
+    memory = library->memory;
+    FT_FREE( amaster );
+
+    return FT_Err_Ok;
+  }
 
   /* documentation is in ftmm.h */
 
 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009