Lines Matching refs:value
606 bool checkreturn pb_encode_varint(pb_ostream_t *stream, pb_uint64_t value) in pb_encode_varint() argument
608 if (value <= 0x7F) in pb_encode_varint()
611 pb_byte_t byte = (pb_byte_t)value; in pb_encode_varint()
617 return pb_encode_varint_32(stream, value, 0); in pb_encode_varint()
619 return pb_encode_varint_32(stream, (uint32_t)value, (uint32_t)(value >> 32)); in pb_encode_varint()
624 bool checkreturn pb_encode_svarint(pb_ostream_t *stream, pb_int64_t value) in pb_encode_svarint() argument
628 if (value < 0) in pb_encode_svarint()
629 zigzagged = ~(((pb_uint64_t)value & mask) << 1); in pb_encode_svarint()
631 zigzagged = (pb_uint64_t)value << 1; in pb_encode_svarint()
636 bool checkreturn pb_encode_fixed32(pb_ostream_t *stream, const void *value) in pb_encode_fixed32() argument
640 return pb_write(stream, (const pb_byte_t*)value, 4); in pb_encode_fixed32()
642 uint32_t val = *(const uint32_t*)value; in pb_encode_fixed32()
653 bool checkreturn pb_encode_fixed64(pb_ostream_t *stream, const void *value) in pb_encode_fixed64() argument
657 return pb_write(stream, (const pb_byte_t*)value, 8); in pb_encode_fixed64()
659 uint64_t val = *(const uint64_t*)value; in pb_encode_fixed64()
777 uint32_t value = safe_read_bool(field->pData) ? 1 : 0; in pb_enc_bool() local
779 return pb_encode_varint(stream, value); in pb_enc_bool()
787 pb_uint64_t value = 0; in pb_enc_varint() local
790 value = *(const uint_least8_t*)field->pData; in pb_enc_varint()
792 value = *(const uint_least16_t*)field->pData; in pb_enc_varint()
794 value = *(const uint32_t*)field->pData; in pb_enc_varint()
796 value = *(const pb_uint64_t*)field->pData; in pb_enc_varint()
800 return pb_encode_varint(stream, value); in pb_enc_varint()
805 pb_int64_t value = 0; in pb_enc_varint() local
808 value = *(const int_least8_t*)field->pData; in pb_enc_varint()
810 value = *(const int_least16_t*)field->pData; in pb_enc_varint()
812 value = *(const int32_t*)field->pData; in pb_enc_varint()
814 value = *(const pb_int64_t*)field->pData; in pb_enc_varint()
819 return pb_encode_svarint(stream, value); in pb_enc_varint()
821 else if (value < 0) in pb_enc_varint()
822 return pb_encode_varint_32(stream, (uint32_t)value, (uint32_t)-1); in pb_enc_varint()
825 return pb_encode_varint(stream, (pb_uint64_t)value); in pb_enc_varint()
954 bool pb_encode_float_as_double(pb_ostream_t *stream, float value) in pb_encode_float_as_double() argument
961 in.f = value; in pb_encode_float_as_double()