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

From: Date: Sat, 11 Jan 2014 15:05:01 +0000
Subject: Re: [RFC] 64 bit platform improvements for string length and integer
References: 1 2 3 4 5 6 7  Groups: php.internals 
Request: Send a blank email to internals+get-71063@lists.php.net to get a copy of this message
On Sat, Jan 11, 2014 at 2:48 PM, Anatol Belski <ab@php.net> wrote: > 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, > > Oh I see. The only small objection is that these lines could lead to the unexpected result from the user point of view: if (d > ZEND_INT_MAX) { *p = ZEND_INT_MAX; break; } else if (d < ZEND_INT_MIN) { *p = ZEND_INT_MIN; break; } I think that would make sense to add warning here Also similar checks for "s" and "p" length part (size_t -> int) would be great too! ;) Thanks Regards Jakub

« previous php.internals (#71063) next »