summaryrefslogtreecommitdiff
path: root/ext/spl
diff options
context:
space:
mode:
Diffstat (limited to 'ext/spl')
-rw-r--r--ext/spl/spl_array.c30
-rw-r--r--ext/spl/spl_dllist.c2
-rw-r--r--ext/spl/spl_heap.c2
-rw-r--r--ext/spl/spl_observer.c2
4 files changed, 18 insertions, 18 deletions
diff --git a/ext/spl/spl_array.c b/ext/spl/spl_array.c
index 208f9de7a6..eafc280f0e 100644
--- a/ext/spl/spl_array.c
+++ b/ext/spl/spl_array.c
@@ -129,7 +129,7 @@ SPL_API int spl_hash_verify_pos_ex(spl_array_object * intern, HashTable * ht TSR
/* IS_CONSISTENT(ht);*/
/* HASH_PROTECT_RECURSION(ht);*/
- if (ht->flags & HASH_FLAG_PACKED) {
+ if (ht->u.flags & HASH_FLAG_PACKED) {
if (intern->pos_h == intern->pos && Z_TYPE(ht->arData[intern->pos_h].val) != IS_UNDEF) {
return SUCCESS;
}
@@ -309,7 +309,7 @@ static zval *spl_array_get_dimension_ptr(int check_inherited, zval *object, zval
return &EG(uninitialized_zval);
}
- if ((type == BP_VAR_W || type == BP_VAR_RW) && (ht->nApplyCount > 0)) {
+ if ((type == BP_VAR_W || type == BP_VAR_RW) && (ht->u.v.nApplyCount > 0)) {
zend_error(E_WARNING, "Modification of ArrayObject during sorting is prohibited");
return &EG(error_zval);;
}
@@ -464,7 +464,7 @@ static void spl_array_write_dimension_ex(int check_inherited, zval *object, zval
if (!offset) {
ht = spl_array_get_hash_table(intern, 0 TSRMLS_CC);
- if (ht->nApplyCount > 0) {
+ if (ht->u.v.nApplyCount > 0) {
zend_error(E_WARNING, "Modification of ArrayObject during sorting is prohibited");
return;
}
@@ -481,7 +481,7 @@ static void spl_array_write_dimension_ex(int check_inherited, zval *object, zval
switch (Z_TYPE_P(offset)) {
case IS_STRING:
ht = spl_array_get_hash_table(intern, 0 TSRMLS_CC);
- if (ht->nApplyCount > 0) {
+ if (ht->u.v.nApplyCount > 0) {
zend_error(E_WARNING, "Modification of ArrayObject during sorting is prohibited");
return;
}
@@ -492,7 +492,7 @@ static void spl_array_write_dimension_ex(int check_inherited, zval *object, zval
case IS_BOOL:
case IS_LONG:
ht = spl_array_get_hash_table(intern, 0 TSRMLS_CC);
- if (ht->nApplyCount > 0) {
+ if (ht->u.v.nApplyCount > 0) {
zend_error(E_WARNING, "Modification of ArrayObject during sorting is prohibited");
return;
}
@@ -505,7 +505,7 @@ static void spl_array_write_dimension_ex(int check_inherited, zval *object, zval
return;
case IS_NULL:
ht = spl_array_get_hash_table(intern, 0 TSRMLS_CC);
- if (ht->nApplyCount > 0) {
+ if (ht->u.v.nApplyCount > 0) {
zend_error(E_WARNING, "Modification of ArrayObject during sorting is prohibited");
return;
}
@@ -538,7 +538,7 @@ static void spl_array_unset_dimension_ex(int check_inherited, zval *object, zval
switch(Z_TYPE_P(offset)) {
case IS_STRING:
ht = spl_array_get_hash_table(intern, 0 TSRMLS_CC);
- if (ht->nApplyCount > 0) {
+ if (ht->u.v.nApplyCount > 0) {
zend_error(E_WARNING, "Modification of ArrayObject during sorting is prohibited");
return;
}
@@ -583,7 +583,7 @@ static void spl_array_unset_dimension_ex(int check_inherited, zval *object, zval
index = Z_LVAL_P(offset);
}
ht = spl_array_get_hash_table(intern, 0 TSRMLS_CC);
- if (ht->nApplyCount > 0) {
+ if (ht->u.v.nApplyCount > 0) {
zend_error(E_WARNING, "Modification of ArrayObject during sorting is prohibited");
return;
}
@@ -827,7 +827,7 @@ static HashTable* spl_array_get_debug_info(zval *obj, int *is_temp TSRMLS_DC) /*
ZEND_INIT_SYMTABLE_EX(intern->debug_info, zend_hash_num_elements(intern->std.properties) + 1, 0);
}
- if (intern->debug_info->nApplyCount == 0) {
+ if (intern->debug_info->u.v.nApplyCount == 0) {
zend_hash_clean(intern->debug_info);
zend_hash_copy(intern->debug_info, intern->std.properties, (copy_ctor_func_t) zval_add_ref);
@@ -1446,27 +1446,27 @@ static void spl_array_method(INTERNAL_FUNCTION_PARAMETERS, char *fname, int fnam
*Z_ARRVAL(tmp) = *aht;
if (!use_arg) {
- aht->nApplyCount++;
+ aht->u.v.nApplyCount++;
zend_call_method(NULL, NULL, NULL, fname, fname_len, &retval, 1, &tmp, NULL TSRMLS_CC);
- aht->nApplyCount--;
+ aht->u.v.nApplyCount--;
} else if (use_arg == SPL_ARRAY_METHOD_MAY_USER_ARG) {
if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "|z", &arg) == FAILURE) {
zval_ptr_dtor(&tmp);
zend_throw_exception(spl_ce_BadMethodCallException, "Function expects one argument at most", 0 TSRMLS_CC);
return;
}
- aht->nApplyCount++;
+ aht->u.v.nApplyCount++;
zend_call_method(NULL, NULL, NULL, fname, fname_len, &retval, arg? 2 : 1, &tmp, arg TSRMLS_CC);
- aht->nApplyCount--;
+ aht->u.v.nApplyCount--;
} else {
if (ZEND_NUM_ARGS() != 1 || zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "z", &arg) == FAILURE) {
zval_ptr_dtor(&tmp);
zend_throw_exception(spl_ce_BadMethodCallException, "Function expects exactly one argument", 0 TSRMLS_CC);
return;
}
- aht->nApplyCount++;
+ aht->u.v.nApplyCount++;
zend_call_method(NULL, NULL, NULL, fname, fname_len, &retval, 2, &tmp, arg TSRMLS_CC);
- aht->nApplyCount--;
+ aht->u.v.nApplyCount--;
}
/* A tricky way to pass "aht" by reference, copy back and cleanup */
if (Z_ISREF(tmp) && Z_TYPE_P(Z_REFVAL(tmp))) {
diff --git a/ext/spl/spl_dllist.c b/ext/spl/spl_dllist.c
index 6bc21ee814..dc10dde6e9 100644
--- a/ext/spl/spl_dllist.c
+++ b/ext/spl/spl_dllist.c
@@ -514,7 +514,7 @@ static HashTable* spl_dllist_object_get_debug_info(zval *obj, int *is_temp TSRML
zend_hash_init(intern->debug_info, 1, NULL, ZVAL_PTR_DTOR, 0);
}
- if (intern->debug_info->nApplyCount == 0) {
+ if (intern->debug_info->u.v.nApplyCount == 0) {
if (!intern->std.properties) {
rebuild_object_properties(&intern->std);
diff --git a/ext/spl/spl_heap.c b/ext/spl/spl_heap.c
index 55550d6f40..f8ce102967 100644
--- a/ext/spl/spl_heap.c
+++ b/ext/spl/spl_heap.c
@@ -524,7 +524,7 @@ static HashTable* spl_heap_object_get_debug_info_helper(zend_class_entry *ce, zv
ZEND_INIT_SYMTABLE_EX(intern->debug_info, zend_hash_num_elements(intern->std.properties) + 1, 0);
}
- if (intern->debug_info->nApplyCount == 0) {
+ if (intern->debug_info->u.v.nApplyCount == 0) {
zend_hash_copy(intern->debug_info, intern->std.properties, (copy_ctor_func_t) zval_add_ref);
diff --git a/ext/spl/spl_observer.c b/ext/spl/spl_observer.c
index 0b2eee69eb..5abedecb7f 100644
--- a/ext/spl/spl_observer.c
+++ b/ext/spl/spl_observer.c
@@ -328,7 +328,7 @@ static HashTable* spl_object_storage_debug_info(zval *obj, int *is_temp TSRMLS_D
ZEND_INIT_SYMTABLE_EX(intern->debug_info, zend_hash_num_elements(props) + 1, 0);
}
- if (intern->debug_info->nApplyCount == 0) {
+ if (intern->debug_info->u.v.nApplyCount == 0) {
zend_hash_copy(intern->debug_info, props, (copy_ctor_func_t)zval_add_ref);
array_init(&storage);