aboutsummaryrefslogtreecommitdiffhomepage
path: root/php/ext/google/protobuf/def.c
diff options
context:
space:
mode:
Diffstat (limited to 'php/ext/google/protobuf/def.c')
-rw-r--r--php/ext/google/protobuf/def.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/php/ext/google/protobuf/def.c b/php/ext/google/protobuf/def.c
index cbd0ec62..156eca07 100644
--- a/php/ext/google/protobuf/def.c
+++ b/php/ext/google/protobuf/def.c
@@ -318,7 +318,8 @@ PHP_METHOD(DescriptorPool, internalAddGeneratedFile) {
add_def_obj(desc->def_type_lower, desc_php); \
/* Unlike other messages, MapEntry is shared by all map fields and doesn't \
* have generated PHP class.*/ \
- if (upb_def_type(def) == UPB_DEF_MSG && upb_msgdef_mapentry(def)) { \
+ if (upb_def_type(def) == UPB_DEF_MSG && \
+ upb_msgdef_mapentry(upb_downcast_msgdef(def))) { \
break; \
} \
/* Prepend '.' to package name to make it absolute. */ \