Commit 777d6d59eda1aced48071dc5f265c4bb6dc33c1a

Werner Lemberg 2009-06-25T16:46:39

Provide version information better. * src/base/ftinit.c (FT_Init_FreeType): Don't set version here but... * src/base/ftobjs.c (FT_New_Library): Here.

diff --git a/ChangeLog b/ChangeLog
index 9b8a3c3..8806059 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2009-06-25  Werner Lemberg  <wl@gnu.org>
+
+	Provide version information better.
+
+	* src/base/ftinit.c (FT_Init_FreeType): Don't set version here
+	but...
+	* src/base/ftobjs.c (FT_New_Library): Here.
+
 2009-06-22  Werner Lemberg  <wl@gnu.org>
 
 	Use 16.16 format while parsing Type 1 charstrings.
diff --git a/src/base/ftinit.c b/src/base/ftinit.c
index 4be75b6..da37e24 100644
--- a/src/base/ftinit.c
+++ b/src/base/ftinit.c
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType initialization layer (body).                                */
 /*                                                                         */
-/*  Copyright 1996-2001, 2002, 2005, 2007 by                               */
+/*  Copyright 1996-2001, 2002, 2005, 2007, 2009 by                         */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -223,13 +223,7 @@ Exit:
     if ( error )
       FT_Done_Memory( memory );
     else
-    {
-      (*alibrary)->version_major = FREETYPE_MAJOR;
-      (*alibrary)->version_minor = FREETYPE_MINOR;
-      (*alibrary)->version_patch = FREETYPE_PATCH;
-
       FT_Add_Default_Modules( *alibrary );
-    }
 
     return error;
   }
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index fabb0c6..47946d7 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -4143,6 +4143,10 @@
       goto Fail;
 #endif
 
+    library->version_major = FREETYPE_MAJOR;
+    library->version_minor = FREETYPE_MINOR;
+    library->version_patch = FREETYPE_PATCH;
+
     /* That's ok now */
     *alibrary = library;