freetype
[Top][All Lists]
Advanced

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

Re: [ft] Why is FT_F26Dot6 defined as a signed long


From: Wink Saville
Subject: Re: [ft] Why is FT_F26Dot6 defined as a signed long
Date: Thu, 14 Feb 2019 16:41:06 -0800

> > Interesting, but on a 32bit platform, with long == 32 bits, that
> > wouldn't work.
>
> There is this thing called “LP64” versus “LLP64”, for describing code
> generation on 64-bit architectures. GCC (and I think all the other
> compilers that work on Linux) is “LP64”, which means that “long” and
> pointers are both 64 bits. On Windows, it seems “LLP64” is the norm,
> where “long” is 32 bits and you need to say “long long” to get 64 bits.
>
> C99 introduced the stdint.h include file, which gives explicit names to
> you can use to request particular sizes of integers, to avoid this
> discrepancy.

Yes, In my update-types.patch experiment I used stdint.h and changed the
typedef's of FT_{U}Int{16, 32, 64) to use {u}int{16, 32, 64}. But doing that
caused some warnings, which after "fixing" the resulting library failed with
a memory corruption fault loading a font.

So unless the maintainers think it would be worth putting more effort in this
direction, I'll just leave it as a starting point for some future date.



reply via email to

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