[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft-devel] Freetype Api compatibility is broken
From: |
Behdad Esfahbod |
Subject: |
Re: [ft-devel] Freetype Api compatibility is broken |
Date: |
Sat, 4 Jun 2005 17:26:42 -0400 (EDT) |
I think it's important to have const in function pointers. BTW,
this is a minor source comaptibility, not binary. And there are
changes with respect to exposing the internal headers too, right?
Looking at the CHANGES, there's a ton of new functionality too.
Why don't you simply add const and release 2.2.0 instead?
behdad
On Sat, 4 Jun 2005, Werner LEMBERG wrote:
> As mentioned in another mail, I've reverted the `const' changes for
> the following function pointers:
>
> In ftimage.h:
> FT_Outline_MoveToFunc
> FT_Outline_LineToFunc
> FT_Outline_ConicToFunc
> FT_Outline_CubicToFunc
>
> FT_Raster_RenderFunc
>
> In ftrender.h:
> FT_Glyph_TransformFunc
> FT_Renderer_RenderFunc
> FT_Renderer_TransformFunc
>
> In general I think it is a good idea to use `const' as much as
> possible. Doing a comparison between 2.1.9 and the current cvs, I
> find the following differences in public header files which I would
> like to retain, but I'm not sure whether it is possible to have
> backwards compatibility. Please advise.
>
> FT_Vector_Transform( FT_Vector* vec,
> - FT_Matrix* matrix );
> + const FT_Matrix* matrix );
>
>
> typedef struct FT_Raster_Params_
> {
> - FT_Bitmap* target;
> - void* source;
> + const FT_Bitmap* target;
> + const void* source;
> ...
>
>
> - FT_Outline_Get_CBox( FT_Outline* outline,
> + FT_Outline_Get_CBox( const FT_Outline* outline,
> FT_BBox *acbox );
>
>
> - FT_Outline_Translate( FT_Outline* outline,
> + FT_Outline_Translate( const FT_Outline* outline,
> FT_Pos xOffset,
> FT_Pos yOffset );
>
>
> - FT_Outline_Copy( FT_Outline* source,
> + FT_Outline_Copy( const FT_Outline* source,
> FT_Outline *target );
>
>
> - FT_Outline_Transform( FT_Outline* outline,
> - FT_Matrix* matrix );
> + FT_Outline_Transform( const FT_Outline* outline,
> + const FT_Matrix* matrix );
>
>
> FT_Outline_Get_Bitmap( FT_Library library,
> FT_Outline* outline,
> - FT_Bitmap *abitmap );
> + const FT_Bitmap *abitmap );
>
>
> Werner
>
>
> _______________________________________________
> Freetype-devel mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/freetype-devel
>
>
--behdad
http://behdad.org/