introduce csize_t instead of fixing csize (#12497)
This commit is contained in:
parent
0c7b6c9c15
commit
99078d80d7
18 changed files with 101 additions and 97 deletions
|
|
@ -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), cast[csize_t](buffer.pos), flags)
|
||||
|
||||
proc isDirty*(buffer: PBuffer): bool {.inline.} =
|
||||
result = (buffer.pos != 0)
|
||||
|
|
@ -118,5 +118,3 @@ when false:
|
|||
echo "flushed"
|
||||
b.writeC([1,2,3])
|
||||
echo(repr(b))
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue