[PATCH V2] obsolete: use C code for headrevs calculation
Durham Goode
durham at fb.com
Wed Sep 17 14:50:01 CDT 2014
On 9/17/14, 1:37 AM, Antoine Pitrou wrote:
> On Tue, 16 Sep 2014 21:15:09 -0700
> Durham Goode <durham at fb.com> wrote:
>> + PyObject *isfiltered = PyEval_CallObject(filter, arglist);
>> + Py_DECREF(arglist);
> arglist or isfiltered could be NULL here.
So what is the appropriate pattern here? Change this function to return
an error code, pass the actual result out as a reference parameter, and
if arglist or isfiltered is NULL return a bad error code? Then handle
that in the caller?
I'd almost rather just allow the segfault and not ugly up the code with
all that handling :/ c is so obtuse...
More information about the Mercurial-devel
mailing list