diff options
author | Petteri Aimonen <jpa@git.mail.kapsi.fi> | 2013-02-20 21:58:18 +0200 |
---|---|---|
committer | Petteri Aimonen <jpa@git.mail.kapsi.fi> | 2013-02-20 21:58:18 +0200 |
commit | 69085d93877ef75ca28505487d8a1335a4b7fa6c (patch) | |
tree | a71591b367513ac64dc9b07efd6af8eb553c89b3 /pb_encode.c | |
parent | 258ba8335dd2b54ee9ce934782239f357bca3581 (diff) |
Rename PB_HTYPE_ARRAY -> PB_HTYPE_REPEATED.
This is a more logical name in parallel with PB_HTYPE_REQUIRED and PB_HTYPE_OPTIONAL.
Warning: This breaks backwards-compatibility of generated .pb.c files.
You will have to regenerate the files and recompile.
Diffstat (limited to 'pb_encode.c')
-rw-r--r-- | pb_encode.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pb_encode.c b/pb_encode.c index bba5dc19..85d65782 100644 --- a/pb_encode.c +++ b/pb_encode.c @@ -167,7 +167,7 @@ bool checkreturn pb_encode(pb_ostream_t *stream, const pb_field_t fields[], cons pSize = (const char*)pData + field->size_offset; prev_size = field->data_size; - if (PB_HTYPE(field->type) == PB_HTYPE_ARRAY) + if (PB_HTYPE(field->type) == PB_HTYPE_REPEATED) prev_size *= field->array_size; switch (PB_HTYPE(field->type)) @@ -190,7 +190,7 @@ bool checkreturn pb_encode(pb_ostream_t *stream, const pb_field_t fields[], cons } break; - case PB_HTYPE_ARRAY: + case PB_HTYPE_REPEATED: if (!encode_array(stream, field, pData, *(const size_t*)pSize, func)) return false; break; |