[PATCH] topic: fix istat macro to work with single line if statement

timeless timeless at gmail.com
Tue Apr 5 14:06:24 EDT 2016


Can you change the commit message to start with "parser:" instead of
"topic:"?
On Apr 5, 2016 1:21 PM, "Augie Fackler" <raf at durin42.com> wrote:

> On Tue, Apr 05, 2016 at 09:43:52AM -0500, Matt Fowles wrote:
> > # HG changeset patch
> > # User Matt Fowles <matt.fowles at gmail.com>
> > # Date 1459867423 14400
> > #      Tue Apr 05 10:43:43 2016 -0400
> > # Node ID e96ec39342772ecb4b96c3818fa6eb235128f0b5
> > # Parent  ff0d3b6b287f89594bd8d0308fe2810d2a18ea01
> > topic: fix istat macro to work with single line if statement
>
> Queued, thanks. Congratulations on your first Mercurial patch!
>
> >
> > diff --git a/mercurial/parsers.c b/mercurial/parsers.c
> > --- a/mercurial/parsers.c
> > +++ b/mercurial/parsers.c
> > @@ -1029,12 +1029,14 @@
> >               return NULL;
> >
> >  #define istat(__n, __d) \
> > -     t = PyInt_FromSsize_t(self->__n); \
> > -     if (!t) \
> > -             goto bail; \
> > -     if (PyDict_SetItemString(obj, __d, t) == -1) \
> > -             goto bail; \
> > -     Py_DECREF(t);
> > +     do { \
> > +             t = PyInt_FromSsize_t(self->__n); \
> > +             if (!t) \
> > +                     goto bail; \
> > +             if (PyDict_SetItemString(obj, __d, t) == -1) \
> > +                     goto bail; \
> > +             Py_DECREF(t); \
> > +     } while (0)
> >
> >       if (self->added) {
> >               Py_ssize_t len = PyList_GET_SIZE(self->added);
> > _______________________________________________
> > Mercurial-devel mailing list
> > Mercurial-devel at mercurial-scm.org
> > https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mercurial-scm.org/pipermail/mercurial-devel/attachments/20160405/8f9b95a8/attachment.html>


More information about the Mercurial-devel mailing list