Added method to keep the interface consistent
This commit is contained in:
parent
3ddd63afb7
commit
391bfce39b
2 changed files with 7 additions and 0 deletions
|
@ -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
|
* Pull a string from the protobuf buffer
|
||||||
* @param the buffer, positioned at the field size
|
* @param the buffer, positioned at the field size
|
||||||
|
|
|
@ -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,
|
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);
|
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
|
* retrieve field number and field type from current buffer at position 0
|
||||||
* @param buffer the incoming buffer
|
* @param buffer the incoming buffer
|
||||||
|
|
Loading…
Reference in a new issue