Mercurial > hg
comparison mercurial/cext/revlog.c @ 40742:8edca70dc951
revlog: update the documentation for `trim_endidx`
The function role drifted since the function was commented.
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Mon, 26 Nov 2018 00:23:12 +0100 |
parents | 959130631de3 |
children | c85964d715fd |
comparison
equal
deleted
inserted
replaced
40741:959130631de3 | 40742:8edca70dc951 |
---|---|
1084 return -1; | 1084 return -1; |
1085 } | 1085 } |
1086 return (end_offset - start_offset) + (int64_t)end_size; | 1086 return (end_offset - start_offset) + (int64_t)end_size; |
1087 } | 1087 } |
1088 | 1088 |
1089 /* returns revs[startidx:endidx] without empty trailing revs */ | 1089 /* returns endidx so that revs[startidx:endidx] has no empty trailing revs */ |
1090 static Py_ssize_t trim_endidx(indexObject *self, const Py_ssize_t *revs, | 1090 static Py_ssize_t trim_endidx(indexObject *self, const Py_ssize_t *revs, |
1091 Py_ssize_t startidx, Py_ssize_t endidx) | 1091 Py_ssize_t startidx, Py_ssize_t endidx) |
1092 { | 1092 { |
1093 int length; | 1093 int length; |
1094 while (endidx > 1 && endidx > startidx) { | 1094 while (endidx > 1 && endidx > startidx) { |