aboutsummaryrefslogtreecommitdiffhomepage
path: root/php/ext/google/protobuf/message.c
diff options
context:
space:
mode:
Diffstat (limited to 'php/ext/google/protobuf/message.c')
-rw-r--r--php/ext/google/protobuf/message.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/php/ext/google/protobuf/message.c b/php/ext/google/protobuf/message.c
index 254640c7..519786dd 100644
--- a/php/ext/google/protobuf/message.c
+++ b/php/ext/google/protobuf/message.c
@@ -172,7 +172,7 @@ static zval* message_get_property(zval* object, zval* member, int type,
zend_get_property_info(Z_OBJCE_P(object), member, true TSRMLS_CC);
return layout_get(
self->descriptor->layout, message_data(self), field,
- &Z_OBJ_P(object)->properties_table[property_info->offset] TSRMLS_CC);
+ OBJ_PROP(Z_OBJ_P(object), property_info->offset) TSRMLS_CC);
#else
property_info =
zend_get_property_info(Z_OBJCE_P(object), Z_STR_P(member), true);
@@ -222,7 +222,7 @@ void custom_data_init(const zend_class_entry* ce,
// case a collection happens during object creation in layout_init().
intern->descriptor = desc;
layout_init(desc->layout, message_data(intern),
- intern->std.properties_table PHP_PROTO_TSRMLS_CC);
+ &intern->std PHP_PROTO_TSRMLS_CC);
}
void build_class_from_descriptor(
@@ -265,8 +265,7 @@ PHP_METHOD(Message, clear) {
zend_class_entry* ce = desc->klass;
object_properties_init(&msg->std, ce);
- layout_init(desc->layout, message_data(msg),
- msg->std.properties_table TSRMLS_CC);
+ layout_init(desc->layout, message_data(msg), &msg->std TSRMLS_CC);
}
PHP_METHOD(Message, mergeFrom) {
@@ -301,7 +300,8 @@ PHP_METHOD(Message, readOneof) {
int property_cache_index =
msg->descriptor->layout->fields[upb_fielddef_index(field)].cache_index;
- zval* property_ptr = OBJ_PROP(Z_OBJ_P(getThis()), property_cache_index);
+ zval* property_ptr = CACHED_PTR_TO_ZVAL_PTR(
+ OBJ_PROP(Z_OBJ_P(getThis()), property_cache_index));
// Unlike singular fields, oneof fields share cached property. So we cannot
// let lay_get modify the cached property. Instead, we pass in the return