summaryrefslogtreecommitdiff
path: root/Zend/zend_API.c
diff options
context:
space:
mode:
authorMatt Wilmas <mattwil@php.net>2008-05-27 10:29:33 +0000
committerMatt Wilmas <mattwil@php.net>2008-05-27 10:29:33 +0000
commit7da75d81e7993e8c0dd56edf2614be4ce69970a4 (patch)
treed840bb6eaa090116900c27b861eb265c474282aa /Zend/zend_API.c
parenta2da2a91b1278c21b73f1ef5c9f6d4500d6b0c45 (diff)
downloadphp-git-7da75d81e7993e8c0dd56edf2614be4ce69970a4.tar.gz
MFH: Add array_init_size() and use it where array size is known at initialization
Diffstat (limited to 'Zend/zend_API.c')
-rw-r--r--Zend/zend_API.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Zend/zend_API.c b/Zend/zend_API.c
index a3b2b1e4ae..163ec5411c 100644
--- a/Zend/zend_API.c
+++ b/Zend/zend_API.c
@@ -922,11 +922,11 @@ ZEND_API int zend_parse_method_parameters_ex(int flags, int num_args TSRMLS_DC,
/* }}} */
/* Argument parsing API -- andrei */
-ZEND_API int _array_init(zval *arg ZEND_FILE_LINE_DC) /* {{{ */
+ZEND_API int _array_init(zval *arg, uint size ZEND_FILE_LINE_DC) /* {{{ */
{
ALLOC_HASHTABLE_REL(Z_ARRVAL_P(arg));
- _zend_hash_init(Z_ARRVAL_P(arg), 0, NULL, ZVAL_PTR_DTOR, 0 ZEND_FILE_LINE_RELAY_CC);
+ _zend_hash_init(Z_ARRVAL_P(arg), size, NULL, ZVAL_PTR_DTOR, 0 ZEND_FILE_LINE_RELAY_CC);
Z_TYPE_P(arg) = IS_ARRAY;
return SUCCESS;
}