Lines Matching refs:substream
321 bool checkreturn pb_make_string_substream(pb_istream_t *stream, pb_istream_t *substream) in pb_make_string_substream() argument
327 *substream = *stream; in pb_make_string_substream()
328 if (substream->bytes_left < size) in pb_make_string_substream()
331 substream->bytes_left = size; in pb_make_string_substream()
336 void pb_close_string_substream(pb_istream_t *stream, pb_istream_t *substream) in pb_close_string_substream() argument
338 stream->state = substream->state; in pb_close_string_substream()
341 stream->errmsg = substream->errmsg; in pb_close_string_substream()
373 pb_istream_t substream; in decode_static_field() local
374 if (!pb_make_string_substream(stream, &substream)) in decode_static_field()
377 while (substream.bytes_left > 0 && *size < iter->pos->array_size) in decode_static_field()
380 if (!func(&substream, iter->pos, pItem)) in decode_static_field()
387 pb_close_string_substream(stream, &substream); in decode_static_field()
389 if (substream.bytes_left != 0) in decode_static_field()
530 pb_istream_t substream; in decode_pointer_field()
532 if (!pb_make_string_substream(stream, &substream)) in decode_pointer_field()
535 while (substream.bytes_left) in decode_pointer_field()
542 allocated_size += (substream.bytes_left - 1) / iter->pos->data_size + 1; in decode_pointer_field()
544 … if (!allocate_field(&substream, iter->pData, iter->pos->data_size, allocated_size)) in decode_pointer_field()
554 if (!func(&substream, iter->pos, pItem)) in decode_pointer_field()
571 pb_close_string_substream(stream, &substream); in decode_pointer_field()
614 pb_istream_t substream; in decode_callback_field() local
616 if (!pb_make_string_substream(stream, &substream)) in decode_callback_field()
621 if (!pCallback->funcs.decode(&substream, iter->pos, arg)) in decode_callback_field()
623 } while (substream.bytes_left); in decode_callback_field()
625 pb_close_string_substream(stream, &substream); in decode_callback_field()
634 pb_istream_t substream; in decode_callback_field() local
640 substream = pb_istream_from_buffer(buffer, size); in decode_callback_field()
642 return pCallback->funcs.decode(&substream, iter->pos, arg); in decode_callback_field()
959 pb_istream_t substream; in pb_decode_delimited() local
962 if (!pb_make_string_substream(stream, &substream)) in pb_decode_delimited()
965 status = pb_decode(&substream, fields, dest_struct); in pb_decode_delimited()
966 pb_close_string_substream(stream, &substream); in pb_decode_delimited()
1329 pb_istream_t substream; in pb_dec_submessage() local
1332 if (!pb_make_string_substream(stream, &substream)) in pb_dec_submessage()
1341 status = pb_decode(&substream, submsg_fields, dest); in pb_dec_submessage()
1343 status = pb_decode_noinit(&substream, submsg_fields, dest); in pb_dec_submessage()
1345 pb_close_string_substream(stream, &substream); in pb_dec_submessage()