From 69085d93877ef75ca28505487d8a1335a4b7fa6c Mon Sep 17 00:00:00 2001 From: Petteri Aimonen Date: Wed, 20 Feb 2013 21:58:18 +0200 Subject: 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. --- pb_encode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pb_encode.c') 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; -- cgit 1.2.3-korg