Commit 473feecf authored by Wayne Davison's avatar Wayne Davison

Added {read,write}_varlong30() inline functions to use the

right long-int function based on protocol version.
parent 351e23ad
......@@ -25,6 +25,14 @@ read_varint30(int f)
return read_varint(f);
}
static inline int64
read_varlong30(int f, uchar min_bytes)
{
if (protocol_version < 30)
return read_longint(f);
return read_varlong(f, min_bytes);
}
static inline void
write_varint30(int f, int32 x)
{
......@@ -33,3 +41,12 @@ write_varint30(int f, int32 x)
else
write_varint(f, x);
}
static inline void
write_varlong30(int f, int64 x, uchar min_bytes)
{
if (protocol_version < 30)
write_longint(f, x);
else
write_varlong(f, x, min_bytes);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment