Re: [RFC] 64 bit platform improvements for string length and integer

From: Date: Sat, 11 Jan 2014 14:48:22 +0000
Subject: Re: [RFC] 64 bit platform improvements for string length and integer
References: 1 2 3 4 5 6  Groups: php.internals 
Request: Send a blank email to internals+get-71062@lists.php.net to get a copy of this message
Hi Jakub, On Sat, January 11, 2014 14:18, Jakub Zelenka wrote: > Hi Anatol, > > > > >> >> About zpp I've got a click - the compatibility with 5.x can be >> integrated into zpp itself in 6.x. I mean look here >> >> ³´6 >> �‡ŠÇÒ‰^y÷ 8http://git.php.net/?p=php-src.git;a=blob;f=Zend/zend_API.c;hb=refs/head >> s/str_size_and_int64#l326 - 'l' and 'L' was replaced with 'i' >> and 'I', >> but nothing prevents to turn those formats as aliases in 6.x. That way >> 'l' and 'i' and another pairs >> will do the same thing, new implementations can use clean semantics, and >> the old formats can be removed after 5.x EOL. This solution however >> won't force the new semantic. >> > > I agree with keeping old flags ('l', 'p', 's'...). I think that > would be > good to add range checks to zend_parse_arg_impl for these flags. If the > casted value is bigger (LONG_MAX, INT_MAX...), then warning. It would be > really helpful and simplify the migration for library wrappers where > these checks needs to be usually done... > the range checks is what 'L' vs 'I' would stand for, the 'L' would be available as alias for 'I', so one don't has to change zpp. A good thing were to add type checks, with gcc http://gcc.gnu.org/onlinedocs/gcc/Typeof.html , however not sure it's available with Visual Studio. Regards Anatol

« previous php.internals (#71062) next »