Lines Matching refs:data_size

46 static bool checkreturn allocate_field(pb_istream_t *stream, void *pData, size_t data_size, size_t …
424 if (field->data_size == sizeof(float)) in decode_basic_field()
486 field->pData = (char*)field->pField + field->data_size * (*size); in decode_static_field()
499 field->pData = (char*)field->pData + field->data_size; in decode_static_field()
513 field->pData = (char*)field->pField + field->data_size * (*size); in decode_static_field()
532 memset(field->pData, 0, (size_t)field->data_size); in decode_static_field()
561 static bool checkreturn allocate_field(pb_istream_t *stream, void *pData, size_t data_size, size_t … in allocate_field() argument
565 if (data_size == 0 || array_size == 0) in allocate_field()
572 if (data_size == 1 && array_size == 1) in allocate_field()
574 data_size = 2; in allocate_field()
585 if (data_size >= check_limit || array_size >= check_limit) in allocate_field()
588 if (size_max / array_size < data_size) in allocate_field()
598 ptr = pb_realloc(ptr, array_size * data_size); in allocate_field()
618 memset(pItem, 0, field->data_size); in initialize_pointer_field()
656 if (!allocate_field(stream, field->pField, field->data_size, 1)) in decode_pointer_field()
693 size_t remain = (substream.bytes_left - 1) / field->data_size + 1; in decode_pointer_field()
699 … if (!allocate_field(&substream, field->pField, field->data_size, allocated_size)) in decode_pointer_field()
707 field->pData = *(char**)field->pField + field->data_size * (*size); in decode_pointer_field()
736 if (!allocate_field(stream, field->pField, field->data_size, (size_t)(*size + 1))) in decode_pointer_field()
739 field->pData = *(char**)field->pField + field->data_size * (*size); in decode_pointer_field()
926 memset(field->pData, 0, (size_t)field->data_size); in pb_field_set_to_default()
1286 field->pData = (char*)field->pData + field->data_size; in pb_release_single_field()
1433 if (field->data_size == sizeof(pb_uint64_t)) in pb_dec_varint()
1435 else if (field->data_size == sizeof(uint32_t)) in pb_dec_varint()
1437 else if (field->data_size == sizeof(uint_least16_t)) in pb_dec_varint()
1439 else if (field->data_size == sizeof(uint_least8_t)) in pb_dec_varint()
1471 if (field->data_size == sizeof(pb_int64_t)) in pb_dec_varint()
1478 if (field->data_size == sizeof(pb_int64_t)) in pb_dec_varint()
1480 else if (field->data_size == sizeof(int32_t)) in pb_dec_varint()
1482 else if (field->data_size == sizeof(int_least16_t)) in pb_dec_varint()
1484 else if (field->data_size == sizeof(int_least8_t)) in pb_dec_varint()
1527 if (alloc_size > field->data_size) in pb_dec_bytes()
1569 if (alloc_size > field->data_size) in pb_dec_string()
1651 memset(field->pData, 0, (size_t)field->data_size); in pb_dec_fixed_length_bytes()
1655 if (size != field->data_size) in pb_dec_fixed_length_bytes()
1658 return pb_read(stream, (pb_byte_t*)field->pData, (size_t)field->data_size); in pb_dec_fixed_length_bytes()