[PATCH 3 of 3] inotify: _inotify.c: bugfix: remove_watch has to return PyNone on success
Nicolas Dumazet
nicdumz at gmail.com
Thu Aug 27 05:01:09 CDT 2009
# HG changeset patch
# User Nicolas Dumazet <nicdumz.commits at gmail.com>
# Date 1251366921 -7200
# Node ID 2396f432f17f0baf1c40b7174380af0cbc0c220f
# Parent 89c3097418f40581bcb1d5405368a078708679d4
inotify: _inotify.c: bugfix: remove_watch has to return PyNone on success
We are not currently using that API function in inotify, hence the reason
for the "silent" bug. But returning NULL here causes the interpreter to crash.
Let's keep code clean for reusers :)
diff --git a/hgext/inotify/linux/_inotify.c b/hgext/inotify/linux/_inotify.c
--- a/hgext/inotify/linux/_inotify.c
+++ b/hgext/inotify/linux/_inotify.c
@@ -105,6 +105,7 @@
return NULL;
}
+ ret = Py_None;
Py_INCREF(Py_None);
return ret;
}
More information about the Mercurial-devel
mailing list