Skip to content

Commit 6694d28

Browse files
committed
Add garbage_ptr to write_property handler
1 parent 4c580af commit 6694d28

30 files changed

+106
-111
lines changed

Zend/tests/gh10168/assign_prop.phpt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
--TEST--
22
GH-10168: Assign prop
3-
--XFAIL--
43
--FILE--
54
<?php
65

Zend/tests/gh10168/assign_prop_ref.phpt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
--TEST--
22
GH-10168: Assign prop ref
3-
--XFAIL--
43
--FILE--
54
<?php
65

Zend/tests/gh10168/assign_prop_ref_with_prop_ref.phpt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
--TEST--
22
GH-10168: Assign prop ref with prop ref
3-
--XFAIL--
43
--FILE--
54
<?php
65

Zend/tests/gh10168/assign_prop_with_prop_ref.phpt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
--TEST--
22
GH-10168: Assign prop with prop ref
3-
--XFAIL--
43
--FILE--
54
<?php
65

Zend/tests/gh10168/assign_untyped_prop.phpt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
--TEST--
22
GH-10168: Assign prop
3-
--XFAIL--
43
--FILE--
54
<?php
65

Zend/tests/gh10168/assign_untyped_prop_ref.phpt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
--TEST--
22
GH-10168: Assign prop ref
3-
--XFAIL--
43
--FILE--
54
<?php
65

Zend/tests/gh10168/assign_untyped_prop_ref_with_prop_ref.phpt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
--TEST--
22
GH-10168: Assign prop ref with prop ref
3-
--XFAIL--
43
--FILE--
54
<?php
65

Zend/tests/gh10168/assign_untyped_prop_with_prop_ref.phpt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
--TEST--
22
GH-10168: Assign prop with prop ref
3-
--XFAIL--
43
--FILE--
54
<?php
65

Zend/zend_API.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1328,7 +1328,7 @@ ZEND_API void zend_merge_properties(zval *obj, HashTable *properties) /* {{{ */
13281328
EG(fake_scope) = Z_OBJCE_P(obj);
13291329
ZEND_HASH_MAP_FOREACH_STR_KEY_VAL(properties, key, value) {
13301330
if (key) {
1331-
write_property(zobj, key, value, NULL);
1331+
write_property(zobj, key, value, NULL, NULL);
13321332
}
13331333
} ZEND_HASH_FOREACH_END();
13341334
EG(fake_scope) = old_scope;
@@ -2208,7 +2208,7 @@ ZEND_API void add_property_zval_ex(zval *arg, const char *key, size_t key_len, z
22082208
zend_string *str;
22092209

22102210
str = zend_string_init(key, key_len, 0);
2211-
Z_OBJ_HANDLER_P(arg, write_property)(Z_OBJ_P(arg), str, value, NULL);
2211+
Z_OBJ_HANDLER_P(arg, write_property)(Z_OBJ_P(arg), str, value, NULL, NULL);
22122212
zend_string_release_ex(str, 0);
22132213
}
22142214
/* }}} */
@@ -4643,7 +4643,7 @@ ZEND_API void zend_update_property_ex(zend_class_entry *scope, zend_object *obje
46434643

46444644
EG(fake_scope) = scope;
46454645

4646-
object->handlers->write_property(object, name, value, NULL);
4646+
object->handlers->write_property(object, name, value, NULL, NULL);
46474647

46484648
EG(fake_scope) = old_scope;
46494649
}
@@ -4657,7 +4657,7 @@ ZEND_API void zend_update_property(zend_class_entry *scope, zend_object *object,
46574657
EG(fake_scope) = scope;
46584658

46594659
property = zend_string_init(name, name_length, 0);
4660-
object->handlers->write_property(object, property, value, NULL);
4660+
object->handlers->write_property(object, property, value, NULL, NULL);
46614661
zend_string_release_ex(property, 0);
46624662

46634663
EG(fake_scope) = old_scope;

Zend/zend_execute.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2036,7 +2036,7 @@ static zend_never_inline void zend_post_incdec_overloaded_property(zend_object *
20362036
} else {
20372037
decrement_function(&z_copy);
20382038
}
2039-
object->handlers->write_property(object, name, &z_copy, cache_slot);
2039+
object->handlers->write_property(object, name, &z_copy, cache_slot, NULL);
20402040
OBJ_RELEASE(object);
20412041
zval_ptr_dtor(&z_copy);
20422042
if (z == &rv) {
@@ -2069,7 +2069,7 @@ static zend_never_inline void zend_pre_incdec_overloaded_property(zend_object *o
20692069
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
20702070
ZVAL_COPY(EX_VAR(opline->result.var), &z_copy);
20712071
}
2072-
object->handlers->write_property(object, name, &z_copy, cache_slot);
2072+
object->handlers->write_property(object, name, &z_copy, cache_slot, NULL);
20732073
OBJ_RELEASE(object);
20742074
zval_ptr_dtor(&z_copy);
20752075
if (z == &rv) {
@@ -2092,7 +2092,7 @@ static zend_never_inline void zend_assign_op_overloaded_property(zend_object *ob
20922092
return;
20932093
}
20942094
if (zend_binary_op(&res, z, value OPLINE_CC) == SUCCESS) {
2095-
object->handlers->write_property(object, name, &res, cache_slot);
2095+
object->handlers->write_property(object, name, &res, cache_slot, NULL);
20962096
}
20972097
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
20982098
ZVAL_COPY(EX_VAR(opline->result.var), &res);

0 commit comments

Comments
 (0)