summaryrefslogtreecommitdiff
path: root/python2
diff options
context:
space:
mode:
authorSebastien Martini <seb@dbzteam.org>2012-04-14 18:12:16 +0200
committerSebastien Martini <seb@dbzteam.org>2012-04-14 18:12:16 +0200
commite1cbd40ee41ef27e6f91a8b098cd2a0fd6e736f3 (patch)
tree0893045e57a9b7efd7443d7f945690720c5f4836 /python2
parent68632f23eac6dd2fbd288616b3e2355be9ad3205 (diff)
downloadpyinotify-e1cbd40ee41ef27e6f91a8b098cd2a0fd6e736f3.tar.gz
Fixed runtime warnings in inotify ctypes' wrapper.
Contributed by bdkearns https://github.com/bdkearns
Diffstat (limited to 'python2')
-rwxr-xr-xpython2/pyinotify.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/python2/pyinotify.py b/python2/pyinotify.py
index 204e381..cb562c5 100755
--- a/python2/pyinotify.py
+++ b/python2/pyinotify.py
@@ -220,6 +220,14 @@ class _CtypesLibcINotifyWrapper(INotifyWrapper):
not hasattr(self._libc, 'inotify_add_watch') or
not hasattr(self._libc, 'inotify_rm_watch')):
return False
+
+ self._libc.inotify_init.argtypes = []
+ self._libc.inotify_init.restype = ctypes.c_int
+ self._libc.inotify_add_watch.argtypes = [ctypes.c_int, ctypes.c_char_p,
+ ctypes.c_uint32]
+ self._libc.inotify_add_watch.restype = ctypes.c_int
+ self._libc.inotify_rm_watch.argtypes = [ctypes.c_int, ctypes.c_int]
+ self._libc.inotify_rm_watch.restype = ctypes.c_int
return True
def _get_errno(self):