mirror of
https://github.com/php/php-src.git
synced 2024-11-24 10:24:11 +08:00
Merge branch 'PHP-7.1'
This commit is contained in:
commit
fc89c5d7f8
@ -139,6 +139,7 @@ struct _zval_struct {
|
||||
uint32_t fe_iter_idx; /* foreach iterator index */
|
||||
uint32_t access_flags; /* class constant access flags */
|
||||
uint32_t property_guard; /* single property guard */
|
||||
uint32_t extra; /* not further specified */
|
||||
} u2;
|
||||
};
|
||||
|
||||
@ -364,6 +365,9 @@ static zend_always_inline zend_uchar zval_get_type(const zval* pz) {
|
||||
#define Z_ACCESS_FLAGS(zval) (zval).u2.access_flags
|
||||
#define Z_ACCESS_FLAGS_P(zval_p) Z_ACCESS_FLAGS(*(zval_p))
|
||||
|
||||
#define Z_EXTRA(zval) (zval).u2.extra
|
||||
#define Z_EXTRA_P(zval_p) Z_EXTRA(*(zval_p))
|
||||
|
||||
#define Z_COUNTED(zval) (zval).value.counted
|
||||
#define Z_COUNTED_P(zval_p) Z_COUNTED(*(zval_p))
|
||||
|
||||
|
@ -143,7 +143,7 @@ PHPAPI zval *var_tmp_var(php_unserialize_data_t *var_hashx)
|
||||
(*var_hashx)->last_dtor = var_hash;
|
||||
}
|
||||
ZVAL_UNDEF(&var_hash->data[var_hash->used_slots]);
|
||||
Z_ACCESS_FLAGS(var_hash->data[var_hash->used_slots]) = 0;
|
||||
Z_EXTRA(var_hash->data[var_hash->used_slots]) = 0;
|
||||
return &var_hash->data[var_hash->used_slots++];
|
||||
}
|
||||
|
||||
@ -213,7 +213,7 @@ PHPAPI void var_destroy(php_unserialize_data_t *var_hashx)
|
||||
#endif
|
||||
|
||||
/* Perform delayed __wakeup calls */
|
||||
if (Z_ACCESS_FLAGS_P(zv) == VAR_WAKEUP_FLAG) {
|
||||
if (Z_EXTRA_P(zv) == VAR_WAKEUP_FLAG) {
|
||||
if (!wakeup_failed) {
|
||||
zval retval;
|
||||
if (Z_ISUNDEF(wakeup_name)) {
|
||||
@ -563,7 +563,7 @@ static inline int object_common2(UNSERIALIZE_PARAMETER, zend_long elements)
|
||||
/* Delay __wakeup call until end of serialization */
|
||||
zval *wakeup_var = var_tmp_var(var_hash);
|
||||
ZVAL_COPY(wakeup_var, rval);
|
||||
Z_ACCESS_FLAGS_P(wakeup_var) = VAR_WAKEUP_FLAG;
|
||||
Z_EXTRA_P(wakeup_var) = VAR_WAKEUP_FLAG;
|
||||
}
|
||||
|
||||
return finish_nested_data(UNSERIALIZE_PASSTHRU);
|
||||
|
@ -141,7 +141,7 @@ PHPAPI zval *var_tmp_var(php_unserialize_data_t *var_hashx)
|
||||
(*var_hashx)->last_dtor = var_hash;
|
||||
}
|
||||
ZVAL_UNDEF(&var_hash->data[var_hash->used_slots]);
|
||||
Z_ACCESS_FLAGS(var_hash->data[var_hash->used_slots]) = 0;
|
||||
Z_EXTRA(var_hash->data[var_hash->used_slots]) = 0;
|
||||
return &var_hash->data[var_hash->used_slots++];
|
||||
}
|
||||
|
||||
@ -211,7 +211,7 @@ PHPAPI void var_destroy(php_unserialize_data_t *var_hashx)
|
||||
#endif
|
||||
|
||||
/* Perform delayed __wakeup calls */
|
||||
if (Z_ACCESS_FLAGS_P(zv) == VAR_WAKEUP_FLAG) {
|
||||
if (Z_EXTRA_P(zv) == VAR_WAKEUP_FLAG) {
|
||||
if (!wakeup_failed) {
|
||||
zval retval;
|
||||
if (Z_ISUNDEF(wakeup_name)) {
|
||||
@ -567,7 +567,7 @@ static inline int object_common2(UNSERIALIZE_PARAMETER, zend_long elements)
|
||||
/* Delay __wakeup call until end of serialization */
|
||||
zval *wakeup_var = var_tmp_var(var_hash);
|
||||
ZVAL_COPY(wakeup_var, rval);
|
||||
Z_ACCESS_FLAGS_P(wakeup_var) = VAR_WAKEUP_FLAG;
|
||||
Z_EXTRA_P(wakeup_var) = VAR_WAKEUP_FLAG;
|
||||
}
|
||||
|
||||
return finish_nested_data(UNSERIALIZE_PASSTHRU);
|
||||
|
Loading…
Reference in New Issue
Block a user