RETURN_FALSE;
}
- *return_value = **entry;
- zval_copy_ctor(return_value);
+ RETURN_ZVAL(*entry, 1, 0);
}
}
/* }}} */
RETURN_FALSE;
}
- *return_value = **entry;
- zval_copy_ctor(return_value);
+ RETURN_ZVAL(*entry, 1, 0);
}
}
/* }}} */
RETURN_FALSE;
}
- *return_value = **entry;
- zval_copy_ctor(return_value);
+ RETURN_ZVAL(*entry, 1, 0);
}
}
/* }}} */
RETURN_FALSE;
}
- *return_value = **entry;
- zval_copy_ctor(return_value);
+ RETURN_ZVAL(*entry, 1, 0);
}
}
/* }}} */
if (zend_hash_get_current_data(target_hash, (void **) &entry) == FAILURE) {
RETURN_FALSE;
}
- *return_value = **entry;
- zval_copy_ctor(return_value);
+ RETURN_ZVAL(*entry, 1, 0);
}
/* }}} */
WRONG_PARAM_COUNT;
}
if (zend_hash_minmax(Z_ARRVAL_PP(arr), array_data_compare, 0, (void **) &result TSRMLS_CC) == SUCCESS) {
- *return_value = **result;
- zval_copy_ctor(return_value);
+ RETVAL_ZVAL(*result, 1, 0);
} else {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Array must contain atleast one element");
RETURN_FALSE;
}
}
- *return_value = **min;
- zval_copy_ctor(return_value);
+ RETVAL_ZVAL(*min, 1, 0);
efree(args);
}
WRONG_PARAM_COUNT;
}
if (zend_hash_minmax(Z_ARRVAL_PP(arr), array_data_compare, 1, (void **) &result TSRMLS_CC) == SUCCESS) {
- *return_value = **result;
- zval_copy_ctor(return_value);
+ RETVAL_ZVAL(*result, 1, 0);
} else {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Array must contain atleast one element");
RETURN_FALSE;
}
}
- *return_value = **max;
- zval_copy_ctor(return_value);
-
+ RETVAL_ZVAL(*max, 1, 0);
efree(args);
}
}
else
zend_hash_internal_pointer_reset(Z_ARRVAL_PP(stack));
zend_hash_get_current_data(Z_ARRVAL_PP(stack), (void **)&val);
- *return_value = **val;
- zval_copy_ctor(return_value);
- INIT_PZVAL(return_value);
+ RETVAL_ZVAL(*val, 1, 0);
/* Delete the first or last value */
zend_hash_get_current_key_ex(Z_ARRVAL_PP(stack), &key, &key_len, &index, 0, NULL);
do_pad = (input_size >= pad_size_abs) ? 0 : 1;
/* Copy the original array */
- *return_value = **input;
- zval_copy_ctor(return_value);
+ RETVAL_ZVAL(*input, 1, 0);
/* If no need to pad, no need to continue */
if (!do_pad) {
}
/* copy the argument array */
- *return_value = **array;
- zval_copy_ctor(return_value);
+ RETVAL_ZVAL(*array, 1, 0);
if (target_hash->nNumOfElements <= 1) { /* nothing to do */
return;
}
/* copy the argument array */
- *return_value = **args[0];
- zval_copy_ctor(return_value);
+ RETVAL_ZVAL(*args[0], 1, 0);
if ((behavior & INTERSECT_NORMAL) && data_compare_type == INTERSECT_COMP_DATA_USER) {
/* array_uintersect() */
}
/* copy the argument array */
- *return_value = **args[0];
- zval_copy_ctor(return_value);
+ RETVAL_ZVAL(*args[0], 1, 0);
if (behavior == DIFF_NORMAL && data_compare_type == DIFF_COMP_DATA_USER) {
/* array_udiff() */
if (zend_hash_num_elements(htbl) == 0) {
if (result) {
- *return_value = *result;
- zval_copy_ctor(return_value);
+ RETVAL_ZVAL(result, 1, 0);
}
return;
}
zend_hash_move_forward_ex(htbl, &pos);
}
- *return_value = *result;
- zval_copy_ctor(return_value);
- zval_ptr_dtor(&result);
+ RETVAL_ZVAL(result, 0, 1);
}
/* }}} */
/* Short-circuit: if no callback and only one array, just return it. */
if (Z_TYPE_P(callback) == IS_NULL && ZEND_NUM_ARGS() == 2) {
- *return_value = *args[1];
- zval_copy_ctor(return_value);
+ RETVAL_ZVAL(args[1], 1, 0);
efree(array_len);
efree(array_pos);
efree(args);