diff options
author | Joshua Haberman <jhaberman@gmail.com> | 2018-03-06 17:31:39 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-06 17:31:39 -0800 |
commit | a66159a384dba6273ebdfd04ce6623d4b7e0a75e (patch) | |
tree | be9f5460fa96e5e8690f5230a779d64c74e6abd8 /upb/msg.c | |
parent | bcb62b7fbfb0c959f7d3671b40c1b7efbb3a4156 (diff) | |
parent | cafebf6beede670a10535809667ac9b9f3033091 (diff) |
Merge pull request #96 from TeBoring/php-change
For encoding upb needs descriptor type instead of type.
Diffstat (limited to 'upb/msg.c')
-rw-r--r-- | upb/msg.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -77,7 +77,7 @@ static uint8_t upb_msg_fieldsize(const upb_msglayout_fieldinit_v1 *field) { if (field->label == UPB_LABEL_REPEATED) { return sizeof(void*); } else { - return upb_msgval_sizeof(field->type); + return upb_msgval_sizeof(upb_desctype_to_fieldtype[field->descriptortype]); } } @@ -284,7 +284,7 @@ static upb_msglayout *upb_msglayout_new(const upb_msgdef *m) { upb_msglayout_fieldinit_v1 *field = &fields[upb_fielddef_index(f)]; field->number = upb_fielddef_number(f); - field->type = upb_fielddef_type(f); + field->descriptortype = upb_fielddef_descriptortype(f); field->label = upb_fielddef_label(f); if (upb_fielddef_containingoneof(f)) { |