Skip to content

Commit 1fc9c02

Browse files
committed
test: only the change for internal classes
1 parent e5ec39f commit 1fc9c02

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

Zend/zend_API.c

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1607,14 +1607,15 @@ static zend_always_inline void _object_properties_init(zend_object *object, zend
16071607
if (class_type->default_properties_count) {
16081608
zval *src = CE_DEFAULT_PROPERTIES_TABLE(class_type);
16091609
zval *dst = object->properties_table;
1610-
#if 0
1610+
#if 1
16111611
zval *end = src + class_type->default_properties_count;
16121612
if (UNEXPECTED(class_type->type == ZEND_INTERNAL_CLASS)) {
1613-
do {
1614-
ZVAL_COPY_OR_DUP_PROP(dst, src);
1615-
src++;
1616-
dst++;
1617-
} while (src != end);
1613+
// do {
1614+
// ZVAL_COPY_OR_DUP_PROP(dst, src);
1615+
// src++;
1616+
// dst++;
1617+
// } while (src != end);
1618+
memcpy(dst, src, sizeof(zval) * class_type->default_properties_count);
16181619
} else {
16191620
do {
16201621
ZVAL_COPY_PROP(dst, src);
@@ -4394,9 +4395,9 @@ ZEND_API zend_property_info *zend_declare_typed_property(zend_class_entry *ce, z
43944395
}
43954396
}
43964397
// printf("%s %s\n", ce->name->val, name->val);
4397-
if (Z_REFCOUNTED_P(property)) {
4398-
ce->ce_flags |= ZEND_ACC_HAS_RC_PROPS;
4399-
}
4398+
// if (Z_REFCOUNTED_P(property)) {
4399+
// ce->ce_flags |= ZEND_ACC_HAS_RC_PROPS;
4400+
// }
44004401
property_default_ptr = &ce->default_properties_table[OBJ_PROP_TO_NUM(property_info->offset)];
44014402
ZVAL_COPY_VALUE(property_default_ptr, property);
44024403
Z_PROP_FLAG_P(property_default_ptr) = Z_ISUNDEF_P(property) ? IS_PROP_UNINIT : 0;

Zend/zend_inheritance.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2538,7 +2538,7 @@ static void zend_do_traits_property_binding(zend_class_entry *ce, zend_class_ent
25382538
}
25392539
}
25402540
} ZEND_HASH_FOREACH_END();
2541-
ce->ce_flags |= traits[i]->ce_flags & ZEND_ACC_HAS_RC_PROPS;
2541+
// ce->ce_flags |= traits[i]->ce_flags & ZEND_ACC_HAS_RC_PROPS;
25422542
}
25432543
}
25442544
/* }}} */

0 commit comments

Comments
 (0)