1
0
mirror of https://github.com/php/php-src.git synced 2026-03-30 12:13:02 +02:00

Change zend_try_array_init_size arg to uint32_t

If this is all the underlying API supports, it doesn't make sense to
accept something larger here...
This commit is contained in:
Nikita Popov
2019-01-14 09:16:07 +01:00
parent 1ff33f3161
commit e25e2bd9bd

View File

@@ -774,9 +774,9 @@ static zend_always_inline zval *zend_try_array_init(zval *zv) {
return zv;
}
static zend_always_inline zval *zend_try_array_init_size(zval *zv, size_t size) {
static zend_always_inline zval *zend_try_array_init_size(zval *zv, uint32_t size) {
zval tmp;
ZVAL_ARR(&tmp, zend_new_array((uint32_t)size));
ZVAL_ARR(&tmp, zend_new_array(size));
if (UNEXPECTED(zend_try_assign(zv, &tmp) == FAILURE)) {
return NULL;
}