* Fixes #12187
* Point to fork of compactdict
Since the original repo is now archived / read-only
This commit is contained in:
Clyybber 2019-10-08 14:15:47 +02:00 • committed by Andreas Rumpf
commit 00c31e8766
11 changed files with 44 additions and 21 deletions

View file

@ -26,7 +26,7 @@ proc newBuffer*(pkt: PPacket): PBuffer =
copyMem(addr result.data[0], pkt.data, pkt.dataLength)
proc toPacket*(buffer: PBuffer; flags: TPacketFlag): PPacket =
buffer.data.setLen buffer.pos
result = createPacket(cstring(buffer.data), buffer.pos, flags)
result = createPacket(cstring(buffer.data), csize buffer.pos, flags)
proc isDirty*(buffer: PBuffer): bool {.inline.} =
result = (buffer.pos != 0)