diff -r 277b4e6938fa -r 507136150d2b mercurial/parsers.c --- a/mercurial/parsers.c Tue Apr 05 14:44:18 2016 +0300 +++ b/mercurial/parsers.c Tue Apr 05 10:43:43 2016 -0400 @@ -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);