make tests green again

This commit is contained in:
Andreas Rumpf 2018-05-01 15:44:23 +02:00 • committed by Araq
commit 74fe7a800b
19 changed files with 103 additions and 103 deletions

View file

@ -24,7 +24,7 @@ const
ENET_VERSION_MAJOR* = 1
ENET_VERSION_MINOR* = 3
ENET_VERSION_PATCH* = 3
template ENET_VERSION_CREATE(major, minor, patch: expr): expr =
template ENET_VERSION_CREATE(major, minor, patch: untyped): untyped =
(((major) shl 16) or ((minor) shl 8) or (patch))
const
@ -277,22 +277,22 @@ when defined(Linux) or true:
dataLength*: csize
TENetSocketSet* = Tfd_set
## see if these are different on win32, if not then get rid of these
template ENET_HOST_TO_NET_16*(value: expr): expr =
template ENET_HOST_TO_NET_16*(value: untyped): untyped =
(htons(value))
template ENET_HOST_TO_NET_32*(value: expr): expr =
template ENET_HOST_TO_NET_32*(value: untyped): untyped =
(htonl(value))
template ENET_NET_TO_HOST_16*(value: expr): expr =
template ENET_NET_TO_HOST_16*(value: untyped): untyped =
(ntohs(value))
template ENET_NET_TO_HOST_32*(value: expr): expr =
template ENET_NET_TO_HOST_32*(value: untyped): untyped =
(ntohl(value))
template ENET_SOCKETSET_EMPTY*(sockset: expr): expr =
template ENET_SOCKETSET_EMPTY*(sockset: untyped): untyped =
FD_ZERO(addr((sockset)))
template ENET_SOCKETSET_ADD*(sockset, socket: expr): expr =
template ENET_SOCKETSET_ADD*(sockset, socket: untyped): untyped =
FD_SET(socket, addr((sockset)))
template ENET_SOCKETSET_REMOVE*(sockset, socket: expr): expr =
template ENET_SOCKETSET_REMOVE*(sockset, socket: untyped): untyped =
FD_CLEAR(socket, addr((sockset)))
template ENET_SOCKETSET_CHECK*(sockset, socket: expr): expr =
template ENET_SOCKETSET_CHECK*(sockset, socket: untyped): untyped =
FD_ISSET(socket, addr((sockset)))
when defined(Windows):
@ -606,7 +606,7 @@ proc protocolCommandSize*(commandNumber: cuchar): csize{.
{.pop.}
from hashes import `!$`, `!&`, THash, hash
proc hash*(x: TAddress): THash {.nimcall, noSideEffect.} =
from hashes import `!$`, `!&`, Hash, hash
proc hash*(x: TAddress): Hash {.nimcall, noSideEffect.} =
result = !$(hash(x.host.int32) !& hash(x.port.int16))