freetype-devel
[Top][All Lists]
Advanced

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

Re: [ft-devel] Position Independent Port of FreeType2


From: mpsuzuki
Subject: Re: [ft-devel] Position Independent Port of FreeType2
Date: Tue, 20 Jan 2009 23:32:21 +0900

Hi,

On Tue, 20 Jan 2009 15:31:59 +0200
Mickey Gabel <address@hidden> wrote:
>   const int x = 0; /* no problem */
>   const int* p = &x; /* needs address fixup - can't be used in PIC */
>   char  *list1[] = {"zero", "one", "two"}; /* pointers need fixup */
>   char  list2[3][5] = {"zero", "one", "two"}; /* OK, no problem */
>
>FT2 uses lots a lot of such constants, such as arrays of pointers to 
>structs and function tables. This is pervasive throughout all parts of FT2.

Hmm, in BREW development,

        int  x = 0;
        int* p = &x;

is bad, but

        int  x = 0;
        int* p;
        ...

        if ( FT_NEW( p ) );
                goto Error;
        else
                p = &x;

        ...

        FT_FREE( p );

is acceptable? Using ft_malloc/ft_free for such purpose for
such purpose should be avoided?

Regards,
mpsuzuki




reply via email to

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