[PATCH V3] obsolete: use C code for headrevs calculation

Antoine Pitrou solipsis at pitrou.net
Thu Sep 18 06:24:08 CDT 2014


On Wed, 17 Sep 2014 19:01:01 -0700
Durham Goode <durham at fb.com> wrote:
>  
> -static PyObject *index_headrevs(indexObject *self)
> +static int check_filter(PyObject *filter, Py_ssize_t arg, int *isfiltered) {

That's complicated. Why doesn't your function return either 1, 0 or -1?
By the way, PyObject_IsTrue() does exactly that :-)
(meaning you should check its error return as well, or return it
directly)





More information about the Mercurial-devel mailing list