]> granicus.if.org Git - php/commit
Restored double->long conversion behavior to that of PHP 5.2 (on most platforms)...
authorMatt Wilmas <mattwil@php.net>
Thu, 4 Jun 2009 18:18:47 +0000 (18:18 +0000)
committerMatt Wilmas <mattwil@php.net>
Thu, 4 Jun 2009 18:18:47 +0000 (18:18 +0000)
commit8aa9727037b20a9d80adca45752f7477ed06322b
tree72012736382e24dd3f4ba16245d3932b07b0171a
parent14dc87e0ae2f08ab9c954bcdbf4ec05d07601eeb
Restored double->long conversion behavior to that of PHP 5.2 (on most platforms) and prior:
 * Out-of-range numbers overflow/preserve least significant bits (no LONG_MAX/MIN limit)
 * See bug #42868 (presumably-rare platform with different results in 5.2)
 * On 32-bit platforms with 64-bit long type, a zend_long64 cast has been added,
    otherwise it's the same as 5.2
 * Use this conversion method everywhere instead of some plain (long) casts

Added 'L' parameter parsing specifier to ensure a LONG_MAX/MIN limit:
 * Essentially what 5.3's new conversion was doing in most cases
 * Functions with "limit" or "length" type params could be updated to use this,
    and prevent confusing overflow behavior with huge numbers (*also* in 5.2)
  - See bug #47854, for example; or even #42868 again

# Test updates coming
README.PARAMETER_PARSING_API
Zend/Zend.m4
Zend/zend_API.c
Zend/zend_compile.c
Zend/zend_execute.c
Zend/zend_execute_API.c
Zend/zend_operators.c
Zend/zend_operators.h
Zend/zend_vm_def.h
Zend/zend_vm_execute.h
win32/build/config.w32