Lines Matching refs:size

26 …eturn read_raw_value(pb_istream_t *stream, pb_wire_type_t wire_type, pb_byte_t *buf, size_t *size);
320 …return read_raw_value(pb_istream_t *stream, pb_wire_type_t wire_type, pb_byte_t *buf, size_t *size) in read_raw_value() argument
322 size_t max_size = *size; in read_raw_value()
326 *size = 0; in read_raw_value()
329 (*size)++; in read_raw_value()
330 if (*size > max_size) in read_raw_value()
339 *size = 8; in read_raw_value()
343 *size = 4; in read_raw_value()
361 uint32_t size; in pb_make_string_substream() local
362 if (!pb_decode_varint32(stream, &size)) in pb_make_string_substream()
366 if (substream->bytes_left < size) in pb_make_string_substream()
369 substream->bytes_left = (size_t)size; in pb_make_string_substream()
370 stream->bytes_left -= (size_t)size; in pb_make_string_substream()
483 pb_size_t *size = (pb_size_t*)field->pSize; in decode_static_field() local
484 field->pData = (char*)field->pField + field->data_size * (*size); in decode_static_field()
489 while (substream.bytes_left > 0 && *size < field->array_size) in decode_static_field()
496 (*size)++; in decode_static_field()
510 pb_size_t *size = (pb_size_t*)field->pSize; in decode_static_field() local
511 field->pData = (char*)field->pField + field->data_size * (*size); in decode_static_field()
513 if ((*size)++ >= field->array_size) in decode_static_field()
668 pb_size_t *size = (pb_size_t*)field->pSize; in decode_pointer_field()
669 size_t allocated_size = *size; in decode_pointer_field()
677 if (*size == PB_SIZE_MAX) in decode_pointer_field()
686 if ((size_t)*size + 1 > allocated_size) in decode_pointer_field()
705 field->pData = *(char**)field->pField + field->data_size * (*size); in decode_pointer_field()
713 (*size)++; in decode_pointer_field()
723 pb_size_t *size = (pb_size_t*)field->pSize; in decode_pointer_field()
725 if (*size == PB_SIZE_MAX) in decode_pointer_field()
728 if (!allocate_field(stream, field->pField, field->data_size, (size_t)(*size + 1))) in decode_pointer_field()
731 field->pData = *(char**)field->pField + field->data_size * (*size); in decode_pointer_field()
732 (*size)++; in decode_pointer_field()
776 size_t size = sizeof(buffer); in decode_callback_field() local
778 if (!read_raw_value(stream, wire_type, buffer, &size)) in decode_callback_field()
780 substream = pb_istream_from_buffer(buffer, size); in decode_callback_field()
1480 uint32_t size; in pb_dec_bytes() local
1484 if (!pb_decode_varint32(stream, &size)) in pb_dec_bytes()
1487 if (size > PB_SIZE_MAX) in pb_dec_bytes()
1490 alloc_size = PB_BYTES_ARRAY_T_ALLOCSIZE(size); in pb_dec_bytes()
1491 if (size > alloc_size) in pb_dec_bytes()
1499 if (stream->bytes_left < size) in pb_dec_bytes()
1514 dest->size = (pb_size_t)size; in pb_dec_bytes()
1515 return pb_read(stream, dest->bytes, (size_t)size); in pb_dec_bytes()
1520 uint32_t size; in pb_dec_string() local
1524 if (!pb_decode_varint32(stream, &size)) in pb_dec_string()
1527 if (size == (uint32_t)-1) in pb_dec_string()
1531 alloc_size = (size_t)(size + 1); in pb_dec_string()
1533 if (alloc_size < size) in pb_dec_string()
1541 if (stream->bytes_left < size) in pb_dec_string()
1555 dest[size] = 0; in pb_dec_string()
1557 if (!pb_read(stream, dest, (size_t)size)) in pb_dec_string()
1622 uint32_t size; in pb_dec_fixed_length_bytes() local
1624 if (!pb_decode_varint32(stream, &size)) in pb_dec_fixed_length_bytes()
1627 if (size > PB_SIZE_MAX) in pb_dec_fixed_length_bytes()
1630 if (size == 0) in pb_dec_fixed_length_bytes()
1637 if (size != field->data_size) in pb_dec_fixed_length_bytes()