Commit Graph

310 Commits

Author SHA1 Message Date
Sebastian Bergmann
35e83d2afb sed -i "s#1998-2009#1998-2010#g" **/*.c **/*.h **/*.php 2010-01-05 20:46:53 +00:00
Matt Wilmas
8aa9727037 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
2009-06-04 18:18:47 +00:00
Jani Taskinen
a173e44b1f - Removed unnecessary TSRMLS_FETCH() calls 2009-05-11 08:31:03 +00:00
Jani Taskinen
afe34550ad - Syncing with PHP_5_3 (merging some stuff that was not merged before for some reason) 2009-05-11 07:51:43 +00:00
Jani Taskinen
e676f1c24a - And more CS fixes 2009-05-11 00:45:09 +00:00
Jani Taskinen
a8c7f8718e - Nuked more whitespace 2009-05-11 00:40:10 +00:00
Felipe Pena
b474e18f6c - Removed unused variables 2009-03-26 22:16:48 +00:00
Felipe Pena
8ecf8ede1f - Removed:
- UG(unicode) checks
       - pcre_cache_entry.unicode_mode
- Changed:
       - ZEND_STR_TYPE -> IS_UNICODE
       - convert_to_text -> convert_to_unicode
       - convert_to_text_ex -> convert_to_unicode_ex

(Felipe, Steph)
2009-03-26 20:02:53 +00:00
Dmitry Stogov
a2fb2a5bf7 optimization 2009-03-18 11:25:47 +00:00
Dmitry Stogov
83a6de49b1 Fixed floating point mathematic speed degradation (Christian) 2009-03-18 10:49:36 +00:00
Matt Wilmas
c660d02c3c Added overflow comment from div_function 2009-02-17 15:14:48 +00:00
Matt Wilmas
f6c4d4791c Fixed bug #47422 (modulus operator returns incorrect results on 64 bit linux)
Removed abs(), just -1 needs to be checked (only LONG_MIN % -1 is a problem)
2009-02-17 14:14:56 +00:00
Felipe Pena
4ed88343cc - Fixed bug #46701 (Creating associative array with long values in the key fails on 32bit linux)
Patch by Shire
2009-01-05 19:47:13 +00:00
Sebastian Bergmann
7f4dc8702a Bump copyright year, 3 of 3. 2008-12-31 11:12:40 +00:00
Christian Seiler
2230e803d2 - Changed floating point behaviour to consistently use double precision on
all platforms and with all compilers.
2008-12-02 16:03:30 +00:00
Felipe Pena
2985b4f9e3 - Removed some TSRMLS_FETCH()s 2008-08-15 19:45:25 +00:00
Felipe Pena
a5f867f3d5 - Constness (Added const qualifier to several function parameters) 2008-08-12 17:15:59 +00:00
Antony Dovgal
951fe380b3 fix bug #45712 ($something == NaN returns true with 5.3, false with 5.2.*) 2008-08-07 08:36:15 +00:00
Moriyoshi Koizumi
eaeb1f7ee3 * Constify read-only arguments. 2008-07-24 20:38:43 +00:00
Matt Wilmas
d48f694d0a Fixed overflow crash (at least on Windows) in div_function with LONG_MIN / -1
To reproduce: (-PHP_INT_MAX - 1) / -1, so op1 is a long
Same cause as Bug #27354 for mod_function
2008-05-29 11:44:09 +00:00
Antony Dovgal
500e17c5c1 add zend_atol() and use it instead of zend_atoi() where applicable 2008-03-19 12:40:20 +00:00
Dmitry Stogov
6847c18150 Added garbage collector 2008-01-22 09:29:29 +00:00
Dmitry Stogov
dcece889eb Yet another comparison optimisation for usual cases 2008-01-21 19:10:51 +00:00
Sebastian Bergmann
9b620d50b4 Bump copyright year, 2 of 2. 2007-12-31 07:12:20 +00:00
Dmitry Stogov
0c75772f68 Additional fix for bug #42868 2007-12-24 18:10:20 +00:00
Dmitry Stogov
9c024a30a5 Fixed bug #42868 (Floats cast to integer droduce unpredicatable results). (Zoe Slattery) 2007-12-17 11:06:43 +00:00
Dmitry Stogov
6bd7c61eb8 math and comparison optimization 2007-11-20 13:26:08 +00:00
Dmitry Stogov
18215d9347 optimization 2007-10-29 14:37:11 +00:00
Yiduo (David) Wang
95da0dc570 Added macros for managing zval refcounts and is_ref statuses 2007-10-07 05:15:07 +00:00
Jani Taskinen
5d0176a32b - Fix compile warnings 2007-07-21 00:34:41 +00:00
Antony Dovgal
0903c79f2a ("0" == NULL) must be false even in Unicode mode 2007-07-13 17:07:02 +00:00
Antony Dovgal
dd8af0654a fix folding, CS and WS 2007-07-11 11:19:58 +00:00
Antony Dovgal
f28ea3269b fix ZTS build 2007-06-27 12:48:44 +00:00
Dmitry Stogov
06320d3f50 Fixed bitwise operations with numeric unicode strings 2007-06-27 11:04:50 +00:00
Dmitry Stogov
eae255addf Implemented ++ and -- operations for unicode strings 2007-06-27 10:27:04 +00:00
Antony Dovgal
a0ab81a4da minor optimization - make sure the objects are not the same instance before we start comparing their properties 2007-06-06 11:57:24 +00:00
Antony Dovgal
0c9a9f61fb use zend_make_string_zval()
thanks Matt!
2007-05-21 07:34:41 +00:00
Antony Dovgal
348d9b3695 merge one more missing patch from 5_2
thank you for not doing MFB
2007-05-04 11:12:30 +00:00
Antony Dovgal
bcfd4067b6 make concatenating two binary strings a special case 2007-04-30 15:59:12 +00:00
Antony Dovgal
7b0e0787f8 convert non-strings to unicode in unicode mode 2007-04-28 12:04:43 +00:00
Antony Dovgal
35ba6cd0df fix typo (Z_USTRVAL_P -> Z_USTRLEN_P) and CS 2007-04-27 21:27:14 +00:00
Dmitry Stogov
ff7d2b0327 WIN64 support 2007-04-23 10:21:24 +00:00
Antony Dovgal
a63ee1b323 fix & unify double-to-string conversion utils 2007-04-19 09:30:10 +00:00
Antony Dovgal
6f3ddae770 nuke dead code 2007-02-26 21:53:48 +00:00
Antony Dovgal
8acf0fda22 MFB: use zend_spprintf() 2007-02-26 11:43:28 +00:00
Sebastian Bergmann
3717df72ae Bump year. 2007-01-01 09:29:37 +00:00
Antony Dovgal
5204c96323 restore old behaviour when casting objects to strings and NULL 2006-12-27 17:22:22 +00:00
Antony Dovgal
da9f5e95bc fix convert_to_unicode() and convert_to_string() which didn't set the type of the op properly 2006-12-27 16:50:05 +00:00
Ilia Alshanetsky
113686caa4 MFB: Fixed possible memory leak 2006-12-21 01:58:46 +00:00
Andrei Zmievski
8a4e2184e0 Make convert_to_*() APIs return SUCCESS/FAILURE. 2006-12-16 00:21:41 +00:00