Commit graph

1287 commits

Author SHA1 Message Date
Nikita Popov
3831b39302 Use zval_get_string in implode
Also get rid of separate case for IS_OBJECT - this is already
handled by the default branch.
2014-05-28 18:45:00 +02:00
Nikita Popov
bf5a59d281 Use smart_str_append_long in implode 2014-05-28 18:39:41 +02:00
Dmitry Stogov
a1177760b4 Use extended iteration API to avoid in-place modification 2014-05-28 13:00:33 +04:00
Nikita Popov
f1e1231529 Fix strtr() segfault 2014-05-09 15:14:27 +02:00
Dmitry Stogov
17d027ed47 Split IS_BOOL into IS_FALSE and IS_TRUE 2014-04-30 18:32:42 +04:00
Nikita Popov
dd419d24ca Replace more convert_to_* calls 2014-04-25 23:21:05 +02:00
Dmitry Stogov
f9927a6c97 Merge mainstream 'master' branch into refactoring
During merge I had to revert:
	Nikita's patch for php_splice() (it probably needs to be applyed again)
	Bob Weinand's patches related to constant expression handling (we need to review them carefully)
	I also reverted all our attempts to support sapi/phpdbg (we didn't test it anyway)

Conflicts:
	Zend/zend.h
	Zend/zend_API.c
	Zend/zend_ast.c
	Zend/zend_compile.c
	Zend/zend_compile.h
	Zend/zend_constants.c
	Zend/zend_exceptions.c
	Zend/zend_execute.c
	Zend/zend_execute.h
	Zend/zend_execute_API.c
	Zend/zend_hash.c
	Zend/zend_highlight.c
	Zend/zend_language_parser.y
	Zend/zend_language_scanner.c
	Zend/zend_language_scanner_defs.h
	Zend/zend_variables.c
	Zend/zend_vm_def.h
	Zend/zend_vm_execute.h
	ext/date/php_date.c
	ext/dom/documenttype.c
	ext/hash/hash.c
	ext/iconv/iconv.c
	ext/mbstring/tests/zend_multibyte-10.phpt
	ext/mbstring/tests/zend_multibyte-11.phpt
	ext/mbstring/tests/zend_multibyte-12.phpt
	ext/mysql/php_mysql.c
	ext/mysqli/mysqli.c
	ext/mysqlnd/mysqlnd_reverse_api.c
	ext/mysqlnd/php_mysqlnd.c
	ext/opcache/ZendAccelerator.c
	ext/opcache/zend_accelerator_util_funcs.c
	ext/opcache/zend_persist.c
	ext/opcache/zend_persist_calc.c
	ext/pcre/php_pcre.c
	ext/pdo/pdo_dbh.c
	ext/pdo/pdo_stmt.c
	ext/pdo_pgsql/pgsql_driver.c
	ext/pgsql/pgsql.c
	ext/reflection/php_reflection.c
	ext/session/session.c
	ext/spl/spl_array.c
	ext/spl/spl_observer.c
	ext/standard/array.c
	ext/standard/basic_functions.c
	ext/standard/html.c
	ext/standard/mail.c
	ext/standard/php_array.h
	ext/standard/proc_open.c
	ext/standard/streamsfuncs.c
	ext/standard/user_filters.c
	ext/standard/var_unserializer.c
	ext/standard/var_unserializer.re
	main/php_variables.c
	sapi/phpdbg/phpdbg.c
	sapi/phpdbg/phpdbg_bp.c
	sapi/phpdbg/phpdbg_frame.c
	sapi/phpdbg/phpdbg_help.c
	sapi/phpdbg/phpdbg_list.c
	sapi/phpdbg/phpdbg_print.c
	sapi/phpdbg/phpdbg_prompt.c
2014-04-26 00:32:51 +04:00
Dmitry Stogov
b1ff152782 Reimplement strtr() 2014-04-24 19:14:29 +04:00
Dmitry Stogov
4ed452c1b5 Convert zval_get_string() into "fast path" macro and "slow path" function 2014-04-21 22:36:01 +04:00
Nikita Popov
0d43a277b8 Use zval_get_string in a few more places 2014-04-21 17:55:58 +02:00
Dmitry Stogov
dd464fb582 Use ZEND_HASH_FOREACH_* macros 2014-04-21 14:20:05 +04:00
Dmitry Stogov
277f8f6391 ZEND_HASH_FOREACH_* usage 2014-04-18 21:49:07 +04:00
Dmitry Stogov
7652a977a8 Use ZEND_FETCH_FOREACH_* macros to iterate over HashTables instead of zend_hash_move_forward() and family. 2014-04-18 19:18:11 +04:00
Dmitry Stogov
a9aa5224e7 Prevented modification of interned string 2014-04-16 20:59:02 +04:00
Dmitry Stogov
f9b26bc39a Cleanup (2-nd round) 2014-04-15 21:56:30 +04:00
Dmitry Stogov
050d7e38ad Cleanup (1-st round) 2014-04-15 15:40:40 +04:00
Nikita Popov
20f2e5986e Fix ZTS build
This only makes it compile, it doesn't actually work, presumably
because interned strings are assumed in some places.
2014-04-09 23:41:16 +02:00
Tjerk Meesters
2aba2494f5 Merge branch 'PHP-5.5' into PHP-5.6 2014-04-09 07:34:49 +08:00
Tjerk Meesters
032921d80c Fixed bug 67043 2014-04-09 07:33:55 +08:00
Dmitry Stogov
3d17219cd8 Refactored zend_hash_* iteration API zend_hash_fove_forward_ex(ht, pos) and family require second argument to be real pointer.
&(ht)->nInternalPointer should be passed instead of NULL.
zend_hash_update_current_key() may work only with internal pointer.
2014-04-07 23:14:17 +04:00
Dmitry Stogov
76cc99fe60 Refactored ZVAL flags usage to simplify various checks (e.g. Z_REFCOUNTED(), candidate for GC, etc) 2014-04-03 15:26:23 +04:00
Dmitry Stogov
7240b4ec4d Avoid unnecessary zval separations 2014-04-02 01:56:16 +04:00
Dmitry Stogov
6b2ed577fd Avoid unnecessry reallocations 2014-04-01 22:36:17 +04:00
Dmitry Stogov
c6cba55454 Use ZVAL_DEREF() macro 2014-03-27 13:39:09 +04:00
Dmitry Stogov
aa5f55306b Refactored EG(active_symbol_table) to be zend_array* instead of HashTable* 2014-03-17 23:15:22 +04:00
Xinchen Hui
3f794ba743 Improve codes 2014-03-07 22:33:36 +08:00
Xinchen Hui
9e9737061e Fixed IS_REFERENCE handling 2014-03-06 19:07:59 +08:00
Xinchen Hui
11166882c0 Fixed memory leak in ext/standard/tests/strings/str_word_count.php 2014-03-06 19:00:51 +08:00
Dmitry Stogov
040dea8b82 Arguments taken by internal functions using zend_parse_parameters() with "+" and "*" specifications must not be deallocated anymore. 2014-03-05 11:10:52 +04:00
Xinchen Hui
38b72bd783 Fixed bug55871.phpt in another way, test script should be changed? 2014-03-02 22:28:36 +08:00
Xinchen Hui
0f117ef4d9 Fixed php_implode with reference 2014-03-02 22:14:25 +08:00
Xinchen Hui
92eda10261 Fixed str_replace count handling 2014-03-02 22:07:32 +08:00
Tjerk Meesters
e424049840 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  substr_compare(): Allow zero length comparison
2014-02-28 23:48:34 +08:00
datibbaw
2e459be237 substr_compare(): Allow zero length comparison
Treat zero length comparison as always equal.
2014-02-28 23:45:04 +08:00
Xinchen Hui
71dac3d54f Don't add_ref in add_*_str functions 2014-02-25 15:47:24 +08:00
Xinchen Hui
bfcb3defdd Fixed memory leak in ext/standard/tests/strings/quotemeta_basic.php 2014-02-25 13:08:16 +08:00
Xinchen Hui
f482092cab Fixed momory leak in heberv 2014-02-25 13:04:00 +08:00
Xinchen Hui
9e4da2d0ec Fixed segfault in ext/standard/tests/strings/money_format_variation1.phpt 2014-02-25 12:36:33 +08:00
Xinchen Hui
1dc69e86f9 Fixed memory leak in setlocale 2014-02-25 12:30:50 +08:00
Xinchen Hui
e0a32353af Fixed NULL pointer dereference in ext/standard/tests/strings/setlocale_basic2.php 2014-02-25 12:09:39 +08:00
Xinchen Hui
1e5a4f281d Refactor php_uu(en/de)code to returning zend_string 2014-02-24 18:32:09 +08:00
Xinchen Hui
57a3feb422 Fixed memory leak in strrev 2014-02-24 18:15:40 +08:00
Xinchen Hui
9e9f6c7123 Fixed memory leak in str_pad 2014-02-24 17:44:42 +08:00
Xinchen Hui
b529155635 Fixed memory leak in nlbr 2014-02-24 17:40:18 +08:00
Xinchen Hui
a9529b8ad3 Refactor chunk_split returning zend_string to avoid memleak 2014-02-24 17:35:47 +08:00
Xinchen Hui
1bb59c73c4 Fixed NULL pointer dereference in ext/standard/tests/strings/strtr_variation* 2014-02-24 16:36:48 +08:00
Xinchen Hui
6c3c1f0949 Fixed memory leak in ext/standard/tests/strings/bug24098.phpt 2014-02-24 16:14:46 +08:00
Xinchen Hui
94e30a8197 Fixed memory leak in substr_replace 2014-02-24 15:58:38 +08:00
Xinchen Hui
737a84ed04 Revert "Fixed segfault in ext/standard/tests/strings/bug24208.php"
This reverts commit b1fb93b482.
2014-02-24 15:04:05 +08:00
Xinchen Hui
6f6573ef6a Fixed several memory leaks 2014-02-24 15:03:35 +08:00