Lines Matching refs:data_size
51 static bool checkreturn allocate_field(pb_istream_t *stream, void *pData, size_t data_size, size_t …
433 void *pItem = (char*)iter->pData + iter->pos->data_size * (*size); in decode_static_field()
453 char *pItem = (char*)iter->pData + iter->pos->data_size * (*size); in decode_static_field()
467 memset(iter->pData, 0, iter->pos->data_size); in decode_static_field()
482 static bool checkreturn allocate_field(pb_istream_t *stream, void *pData, size_t data_size, size_t … in allocate_field() argument
486 if (data_size == 0 || array_size == 0) in allocate_field()
496 if (data_size >= check_limit || array_size >= check_limit) in allocate_field()
499 if (size_max / array_size < data_size) in allocate_field()
509 ptr = pb_realloc(ptr, array_size * data_size); in allocate_field()
529 memset(pItem, 0, iter->pos->data_size); in initialize_pointer_field()
572 if (!allocate_field(stream, iter->pData, iter->pos->data_size, 1)) in decode_pointer_field()
600 allocated_size += (substream.bytes_left - 1) / iter->pos->data_size + 1; in decode_pointer_field()
602 … if (!allocate_field(&substream, iter->pData, iter->pos->data_size, allocated_size)) in decode_pointer_field()
610 pItem = *(char**)iter->pData + iter->pos->data_size * (*size); in decode_pointer_field()
644 if (!allocate_field(stream, iter->pData, iter->pos->data_size, *size)) in decode_pointer_field()
647 pItem = *(char**)iter->pData + iter->pos->data_size * (*size - 1); in decode_pointer_field()
857 memcpy(iter->pData, iter->pos->ptr, iter->pos->data_size); in pb_field_set_to_default()
862 memset(iter->pData, 0, iter->pos->data_size); in pb_field_set_to_default()
1188 pItem = (char*)pItem + iter->pos->data_size; in pb_release_single_field()
1303 if (field->data_size == sizeof(pb_int64_t)) in pb_dec_varint()
1309 if (field->data_size == sizeof(pb_int64_t)) in pb_dec_varint()
1311 else if (field->data_size == sizeof(int32_t)) in pb_dec_varint()
1313 else if (field->data_size == sizeof(int_least16_t)) in pb_dec_varint()
1315 else if (field->data_size == sizeof(int_least8_t)) in pb_dec_varint()
1333 if (field->data_size == sizeof(pb_uint64_t)) in pb_dec_uvarint()
1335 else if (field->data_size == sizeof(uint32_t)) in pb_dec_uvarint()
1337 else if (field->data_size == sizeof(uint_least16_t)) in pb_dec_uvarint()
1339 else if (field->data_size == sizeof(uint_least8_t)) in pb_dec_uvarint()
1357 if (field->data_size == sizeof(pb_int64_t)) in pb_dec_svarint()
1359 else if (field->data_size == sizeof(int32_t)) in pb_dec_svarint()
1361 else if (field->data_size == sizeof(int_least16_t)) in pb_dec_svarint()
1363 else if (field->data_size == sizeof(int_least8_t)) in pb_dec_svarint()
1419 if (alloc_size > field->data_size) in pb_dec_bytes()
1454 if (alloc_size > field->data_size) in pb_dec_string()
1500 memset(dest, 0, field->data_size); in pb_dec_fixed_length_bytes()
1504 if (size != field->data_size) in pb_dec_fixed_length_bytes()
1507 return pb_read(stream, (pb_byte_t*)dest, field->data_size); in pb_dec_fixed_length_bytes()