[PATCH 5 of 7 V3] sparse-revlog: introduce native (C) implementation of slicechunktodensity

Yuya Nishihara yuya at tcha.org
Mon Nov 19 07:54:45 EST 2018


On Mon, 19 Nov 2018 10:42:17 +0100, Boris Feld wrote:
> # HG changeset patch
> # User Boris Feld <boris.feld at octobus.net>
> # Date 1542276598 -3600
> #      Thu Nov 15 11:09:58 2018 +0100
> # Node ID b365764b9915e600a5c7c273f244f65e2240e00a
> # Parent  f9ce23d5d3aeec9a9e8589ec83d089b2df83da82
> # EXP-Topic sparse-perf
> # Available At https://bitbucket.org/octobus/mercurial-devel/
> #              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r b365764b9915
> sparse-revlog: introduce native (C) implementation of slicechunktodensity

> +		Py_ssize_t revstart;
> +		Py_ssize_t revsize;
> +		if (!index_get_start(self, revs[i], &revstart)) {
> +			goto bail;

Be aware that Py_ssize_t * != long *. I think Py_ssize_t is the right type
here and other places computing offsets or indices.

There are a few more callers which passes Py_ssize_t * as long *argument.


More information about the Mercurial-devel mailing list