FT_EXPORT_DEF( FT_Error )
FT_Init_FreeType(FT_Library* alibrary, FT_Memory amemory)
{
FT_Error error;
/* build a library out of it, then fill it with the set of */
/* default drivers. */
error = FT_New_Library( amemory, alibrary );
if ( error )
{
return error;
}
(*alibrary)->version_major = FREETYPE_MAJOR;
(*alibrary)->version_minor = FREETYPE_MINOR;
(*alibrary)->version_patch = FREETYPE_PATCH;
FT_Add_Default_Modules( *alibrary );
return error;
}
FT_EXPORT_DEF( FT_Error )
FT_Done_FreeType( FT_Library library )
{
if ( library )
{
/* Discard the library object */
FT_Done_Library( library );
}
return FT_Err_Ok;
}
this serves my purpose, but is obviously not backwards compatible, so a mix of this and old would be required if backwards compatibility is a requirement...
or you can just ignore me, and I'll keep making the change locally, I just thought this was good to report.
Tom.
PS: redefining
#define ft_scalloc calloc
#define ft_sfree free
#define ft_smalloc malloc
#define ft_srealloc realloc
is not a valid option, since that would require me to include header files that have no relationship with freetype, and thus would add dependencies on a library that has nothing to do with freetype.