From 6c0018b7a3141ca616dabc1fc46a209eb34fbb13 Mon Sep 17 00:00:00 2001 From: ZyX Date: Thu, 10 Jul 2014 19:16:27 +0400 Subject: [PATCH] Purge use_errno argument from function prototype calls - It is already contained in prototype definition. - PyPy is not able to run code with use_errno there. --- powerline/lib/inotify.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/powerline/lib/inotify.py b/powerline/lib/inotify.py index 0e8211eb..c2b25444 100644 --- a/powerline/lib/inotify.py +++ b/powerline/lib/inotify.py @@ -46,17 +46,17 @@ def load_inotify(): # inotify_add_watch() prototype = ctypes.CFUNCTYPE(ctypes.c_int, ctypes.c_int, ctypes.c_char_p, ctypes.c_uint32, use_errno=True) add_watch = prototype(('inotify_add_watch', libc), ( - (1, "fd"), (1, "pathname"), (1, "mask")), use_errno=True) + (1, "fd"), (1, "pathname"), (1, "mask"))) # inotify_rm_watch() prototype = ctypes.CFUNCTYPE(ctypes.c_int, ctypes.c_int, ctypes.c_int, use_errno=True) rm_watch = prototype(('inotify_rm_watch', libc), ( - (1, "fd"), (1, "wd")), use_errno=True) + (1, "fd"), (1, "wd"))) # read() prototype = ctypes.CFUNCTYPE(ctypes.c_ssize_t, ctypes.c_int, ctypes.c_void_p, ctypes.c_size_t, use_errno=True) read = prototype(('read', libc), ( - (1, "fd"), (1, "buf"), (1, "count")), use_errno=True) + (1, "fd"), (1, "buf"), (1, "count"))) _inotify = (init1, add_watch, rm_watch, read) return _inotify