Added method to keep the interface consistent

Esse commit está contido em:
jmjatlanta 2016-12-21 06:39:13 -05:00
commit 391bfce39b
2 arquivos alterados com 7 adições e 0 exclusões

Ver arquivo

@ -97,6 +97,11 @@ int protobuf_encode_varint(int field_number, enum WireType field_type, unsigned
}
int protobuf_decode_varint(const unsigned char* buffer, size_t buffer_length, unsigned long long* results, size_t* bytes_read) {
*results = varint_decode(buffer, buffer_length, bytes_read);
return 1;
}
/**
* Pull a string from the protobuf buffer
* @param the buffer, positioned at the field size

Ver arquivo

@ -71,6 +71,8 @@ int protobuf_decode_string(const unsigned char* buffer, size_t buffer_length, ch
int protobuf_encode_varint(int field_number, enum WireType field_type, unsigned long long incoming, unsigned char* buffer,
size_t max_buffer_length, size_t* bytes_written);
int protobuf_decode_varint(const unsigned char* buffer, size_t buffer_length, unsigned long long* results, size_t* bytes_read);
/***
* retrieve field number and field type from current buffer at position 0
* @param buffer the incoming buffer