mercurial/cext/revlog.c
changeset 43582 ae5e39512ca0
parent 43554 b56de57c45ce
child 43847 49fa0b31ee1d
equal deleted inserted replaced
43581:f5991fd7cca7 43582:ae5e39512ca0
    60 
    60 
    61 /*
    61 /*
    62  * This class has two behaviors.
    62  * This class has two behaviors.
    63  *
    63  *
    64  * When used in a list-like way (with integer keys), we decode an
    64  * When used in a list-like way (with integer keys), we decode an
    65  * entry in a RevlogNG index file on demand. Our last entry is a
    65  * entry in a RevlogNG index file on demand. We have limited support for
    66  * sentinel, always a nullid.  We have limited support for
       
    67  * integer-keyed insert and delete, only at elements right before the
    66  * integer-keyed insert and delete, only at elements right before the
    68  * sentinel.
    67  * end.
    69  *
    68  *
    70  * With string keys, we lazily perform a reverse mapping from node to
    69  * With string keys, we lazily perform a reverse mapping from node to
    71  * rev, using a base-16 trie.
    70  * rev, using a base-16 trie.
    72  */
    71  */
    73 struct indexObjectStruct {
    72 struct indexObjectStruct {
  2464 		Py_CLEAR(self->added);
  2463 		Py_CLEAR(self->added);
  2465 }
  2464 }
  2466 
  2465 
  2467 /*
  2466 /*
  2468  * Delete a numeric range of revs, which must be at the end of the
  2467  * Delete a numeric range of revs, which must be at the end of the
  2469  * range, but exclude the sentinel nullid entry.
  2468  * range.
  2470  */
  2469  */
  2471 static int index_slice_del(indexObject *self, PyObject *item)
  2470 static int index_slice_del(indexObject *self, PyObject *item)
  2472 {
  2471 {
  2473 	Py_ssize_t start, stop, step, slicelength;
  2472 	Py_ssize_t start, stop, step, slicelength;
  2474 	Py_ssize_t length = index_length(self) + 1;
  2473 	Py_ssize_t length = index_length(self) + 1;