[webkit-dev] Proposal about integer types used in WebKit

Darin Adler darin at apple.com
Fri Jul 24 12:46:20 PDT 2009


Hi folks.

The WebKit project assumes the LP64 approach to 64-bit. Roughly  
speaking, that means that:

     - int is a signed 32-bit integer
     - unsigned is an unsigned 32-bit integer
     - long long is a signed 64-bit integer
     - unsigned long long is an unsigned 64-bit integer

And long and unsigned long will be 32 or 64-bit based on the processor  
type.

Some of our code uses types like int32_t, uint32_t, int64_t, and  
uint64_t. I don’t see the point of doing this. I’d like to suggest  
that we always use int where we’d otherwise use int32_t except where  
there is some issue of integration with an underlying library.

Am I missing something? Is there some real benefit to using types like  
int32_t instead of int in some places in our code and not others? If  
so, what are these critical places and what makes them different from  
the rest of the code?

     -- Darin



More information about the webkit-dev mailing list