D1769: cext: use dedicated type for index entries
yuja (Yuya Nishihara)
phabricator at mercurial-scm.org
Fri Jan 5 05:22:32 UTC 2018
yuja requested changes to this revision.
yuja added inline comments.
This revision now requires changes to proceed.
INLINE COMMENTS
> revlog.c:141
> + if (!value) {
> + PyErr_SetString(PyExc_ValueError,
> + "could not retrieve p1rev");
Perhaps AttributeError would be set by `PyObject_GetAttrString()`.
> revlog.c:321
> + needs to decrease its refcount. */
> + obj = tmpobj;
> }
This is tricky, but looks okay. Alternatively, we could inc/decref borrowed `obj`.
> revlog.c:327
> + result = NULL;
> + goto cleanup;
> + }
I slightly prefer `goto bail` instead of `result = NULL; goto cleanup` pairs.
> revlog.c:1788
> + PyErr_SetString(PyExc_ValueError, "could not get node");
> + return;
> + }
No error reported to the caller.
AttributeError would be set automatically.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D1769
To: indygreg, #hg-reviewers, yuja
Cc: yuja, mercurial-devel
More information about the Mercurial-devel
mailing list