juancarlospaco / psutil-nim

Port of python psutil to Nim
MIT License
28 stars 9 forks source link

psutil_convert_ipaddr() breaks import #5

Closed ThomasTJdev closed 5 years ago

ThomasTJdev commented 5 years ago

OS: Arch Nim: 0.19.1

Place of error

Import of psutil breaks on psutil_convert_ipaddr:

let address = psutil_convert_ipaddr( current.ifa_addr, family )

Example

INim 0.4.1
Nim Compiler Version 0.19.1 [Linux: amd64] at /home/user/.nimble/bin/nim
nim> import psutil
../home/user/.nimble/pkgs/psutil-0.5.5/psutil_posix.nim(130, 44) Error: type mismatch: got <ptr SockAddr, TSa_Family>
but expected one of: 
proc psutil_convert_ipaddr(address: ptr SockAddr; family: int): string
  first type mismatch at position: 2
  required type: int
  but expression 'family' is of type: TSa_Family

expression: psutil_convert_ipaddr(current.ifa_addr, family)