Skip to content

Commit

Permalink
declare argtype for _libc.free
Browse files Browse the repository at this point in the history
fixes #1
  • Loading branch information
paroj committed Jul 16, 2016
1 parent ea361d2 commit ceb0a96
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sensors.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
import ctypes.util

_libc = cdll.LoadLibrary(ctypes.util.find_library("c"))
# see https://github.com/paroj/sensors.py/issues/1
_libc.free.argtypes = [c_void_p]

_hdl = cdll.LoadLibrary(ctypes.util.find_library("sensors"))

version = c_char_p.in_dll(_hdl, "libsensors_version").value.decode("ascii")
Expand Down

0 comments on commit ceb0a96

Please sign in to comment.