freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft-devel] LLP64 model outside Win64


From: Werner LEMBERG
Subject: Re: [ft-devel] LLP64 model outside Win64
Date: Sun, 25 Feb 2018 22:21:13 +0100 (CET)

>> Certainly, if you are going to dynamically allocate a slot for it.
>> I tried to avoid that.
> 
> Totally untested, but why wouldn't this work?
>
> [...]
>
> -      if ( FT_List_Find( &loader->composites,
> -                         FT_UINT_TO_POINTER( glyph_index ) ) )
> +      if ( FT_List_Find( &loader->composites, index ) )

How shall this work?  You are going to store pointers to integers in a
list.  As a consequence, two identical integers can have different
pointers.  How will you then find out whether such an integer is
already in the list?

Actually, only the FT_UINT_TO_POINTER macro makes `FT_List_Find' work
for this task.  You need a different function if you don't like this,
for example, putting the glyph indices into a hash and checking
whether a new value is already present.


    Werner



reply via email to

[Prev in Thread] Current Thread [Next in Thread]