Re: [PHP-DEV] 64-bit integers and 64-bit string length patch is ready to be merged

[email protected] (Andrea Faulds)
Newsgroups php.internals
Message-ID <[email protected]>
On 21 Aug 2014, at 21:49, Nikita Popov <[email protected]> wrote:

> I am also concerned that we now have zend_uint_t (a 64-bit integer type)
> and zend_uint (a 32-bit integer type). Notice the difference? Yes, it's the
> missing _t.
> 
> I would appreciate it if we could consider the following naming convention:
> 
> * zend_(u)int - 32 bit integer type
> * zend_(u)long - 64 bit integer type (on 64 bit systems)
> 
> This retains the original meaning of the type, with the tweak that
> zend_(u)long will be 64bit on LLP64 systems as well. This avoids the
> confusion of having two types that only differ by a _t suffix and have
> totally different meanings. It also removes any need to rename everything
> from LONG to INT.

I was wondering if zend_uint was still 32-bit like I thought it was. I guess I mistook zend_uint_t for zend_uint, which backs up your (implied?) point about confusion.

Your proposal sounds like a great idea, I’d be very in favour of this.

--
Andrea Faulds
http://ajf.me/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.