Skip to content

Commit

Permalink
Use 'l' for ulongs and 'L' for longs to match pika python client
Browse files Browse the repository at this point in the history
  • Loading branch information
thepunkoff committed Feb 15, 2023
1 parent 6dc72cf commit 9d2a5e0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions projects/RabbitMQ.Client/client/impl/WireFormatting.Read.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ static object ReadFieldValueSlow(ReadOnlySpan<byte> span, out int bytesRead)
IList arrayResult = ReadArray(slice, out int arrayBytesRead);
bytesRead = 1 + arrayBytesRead;
return arrayResult;
case 'l':
case 'L':
bytesRead = 9;
return NetworkOrderDeserializer.ReadInt64(slice);
case 'i':
Expand All @@ -133,7 +133,7 @@ static object ReadFieldValueSlow(ReadOnlySpan<byte> span, out int bytesRead)
case 'u':
bytesRead = 3;
return NetworkOrderDeserializer.ReadUInt16(slice);
case 'U':
case 'l':
bytesRead = 9;
return NetworkOrderDeserializer.ReadUInt64(slice);
case 'T':
Expand Down
4 changes: 2 additions & 2 deletions projects/RabbitMQ.Client/client/impl/WireFormatting.Write.cs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ static int WriteFieldValueSlow(ref byte destination, ref byte fieldValue, object
NetworkOrderSerializer.WriteDouble(ref fieldValue, val);
return 9;
case long val:
destination = (byte)'l';
destination = (byte)'L';
NetworkOrderSerializer.WriteInt64(ref fieldValue, val);
return 9;
case byte val:
Expand Down Expand Up @@ -205,7 +205,7 @@ static int WriteFieldValueSlow(ref byte destination, ref byte fieldValue, object
NetworkOrderSerializer.WriteUInt16(ref fieldValue, val);
return 3;
case ulong val:
destination = (byte)'U';
destination = (byte)'l';
NetworkOrderSerializer.WriteUInt64(ref fieldValue, val);
return 9;
default:
Expand Down

0 comments on commit 9d2a5e0

Please sign in to comment.