|
|
|
@ -366,6 +366,17 @@ void Message_construct(zval* msg, zval* array_wrapper) { |
|
|
|
|
const upb_msgdef* submsgdef = upb_fielddef_msgsubdef(field); |
|
|
|
|
PHP_PROTO_HASHTABLE_VALUE desc_php = get_def_obj(submsgdef); |
|
|
|
|
Descriptor* desc = UNBOX_HASHTABLE_VALUE(Descriptor, desc_php); |
|
|
|
|
|
|
|
|
|
CACHED_VALUE* cached = NULL; |
|
|
|
|
if (upb_fielddef_containingoneof(field)) { |
|
|
|
|
void* memory = slot_memory(intern->descriptor->layout, |
|
|
|
|
message_data(intern), field); |
|
|
|
|
int property_cache_index = |
|
|
|
|
intern->descriptor->layout->fields[upb_fielddef_index(field)] |
|
|
|
|
.cache_index; |
|
|
|
|
cached = OBJ_PROP(Z_OBJ_P(msg), property_cache_index); |
|
|
|
|
*(CACHED_VALUE**)(memory) = cached; |
|
|
|
|
} else { |
|
|
|
|
zend_property_info* property_info; |
|
|
|
|
PHP_PROTO_FAKE_SCOPE_BEGIN(Z_OBJCE_P(msg)); |
|
|
|
|
#if PHP_MAJOR_VERSION < 7 |
|
|
|
@ -376,7 +387,8 @@ void Message_construct(zval* msg, zval* array_wrapper) { |
|
|
|
|
zend_get_property_info(Z_OBJCE_P(msg), Z_STR_P(&key), true); |
|
|
|
|
#endif |
|
|
|
|
PHP_PROTO_FAKE_SCOPE_END; |
|
|
|
|
CACHED_VALUE* cached = OBJ_PROP(Z_OBJ_P(msg), property_info->offset); |
|
|
|
|
cached = OBJ_PROP(Z_OBJ_P(msg), property_info->offset); |
|
|
|
|
} |
|
|
|
|
#if PHP_MAJOR_VERSION < 7 |
|
|
|
|
SEPARATE_ZVAL_IF_NOT_REF(cached); |
|
|
|
|
#endif |
|
|
|
|