diff options
author | Nikita Popov <nikic@php.net> | 2014-04-08 23:24:52 +0200 |
---|---|---|
committer | Nikita Popov <nikic@php.net> | 2014-04-09 12:31:21 +0200 |
commit | 22d3eb3117b1b5c484152c9fec5a74b0e95024ea (patch) | |
tree | ddedf440c9aad90230b4c65077a3ccb76fb96f68 /ext/standard/php_array.h | |
parent | 1aa8719e32663fbfcad9668364fbac0bc415b678 (diff) | |
download | php-git-22d3eb3117b1b5c484152c9fec5a74b0e95024ea.tar.gz |
Add zend_hash_splice
This implements the original functionality of php_splice, but
as an in-place operation, thus avoiding copying the HT.
This is much faster (~10x) if the splice removes a small portion
of the array and doesn't insert many elements.
Diffstat (limited to 'ext/standard/php_array.h')
-rw-r--r-- | ext/standard/php_array.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/standard/php_array.h b/ext/standard/php_array.h index c4389dd92a..deddeb4871 100644 --- a/ext/standard/php_array.h +++ b/ext/standard/php_array.h @@ -103,7 +103,7 @@ PHP_FUNCTION(array_key_exists); PHP_FUNCTION(array_chunk); PHP_FUNCTION(array_combine); -PHPAPI HashTable* php_splice(HashTable *, int, int, zval ***, int, HashTable **); +PHPAPI void php_splice(HashTable *ht, zend_uint offset, zend_uint length, zval ***list, zend_uint list_count, HashTable *removed TSRMLS_DC); PHPAPI int php_array_merge(HashTable *dest, HashTable *src, int recursive TSRMLS_DC); PHPAPI int php_array_replace_recursive(HashTable *dest, HashTable *src TSRMLS_DC); PHPAPI int php_multisort_compare(const void *a, const void *b TSRMLS_DC); |