Show More
@@ -40,12 +40,14 b' typedef struct {' | |||||
40 | #define MANIFEST_MALFORMED -3 |
|
40 | #define MANIFEST_MALFORMED -3 | |
41 |
|
41 | |||
42 | /* get the length of the path for a line */ |
|
42 | /* get the length of the path for a line */ | |
43 |
static size_t pathlen(line *l) |
|
43 | static size_t pathlen(line *l) | |
|
44 | { | |||
44 | return strlen(l->start); |
|
45 | return strlen(l->start); | |
45 | } |
|
46 | } | |
46 |
|
47 | |||
47 | /* get the node value of a single line */ |
|
48 | /* get the node value of a single line */ | |
48 |
static PyObject *nodeof(line *l) |
|
49 | static PyObject *nodeof(line *l) | |
|
50 | { | |||
49 | char *s = l->start; |
|
51 | char *s = l->start; | |
50 | ssize_t llen = pathlen(l); |
|
52 | ssize_t llen = pathlen(l); | |
51 | PyObject *hash = unhexlify(s + llen + 1, 40); |
|
53 | PyObject *hash = unhexlify(s + llen + 1, 40); | |
@@ -434,7 +436,8 b' static int lazymanifest_delitem(lazymani' | |||||
434 |
|
436 | |||
435 | /* Do a binary search for the insertion point for new, creating the |
|
437 | /* Do a binary search for the insertion point for new, creating the | |
436 | * new entry if needed. */ |
|
438 | * new entry if needed. */ | |
437 |
static int internalsetitem(lazymanifest *self, line *new) |
|
439 | static int internalsetitem(lazymanifest *self, line *new) | |
|
440 | { | |||
438 | int start = 0, end = self->numlines; |
|
441 | int start = 0, end = self->numlines; | |
439 | while (start < end) { |
|
442 | while (start < end) { | |
440 | int pos = start + (end - start) / 2; |
|
443 | int pos = start + (end - start) / 2; | |
@@ -602,7 +605,8 b' static PySequenceMethods lazymanifest_se' | |||||
602 | static PyTypeObject lazymanifestType; |
|
605 | static PyTypeObject lazymanifestType; | |
603 |
|
606 | |||
604 | /* If the manifest has changes, build the new manifest text and reindex it. */ |
|
607 | /* If the manifest has changes, build the new manifest text and reindex it. */ | |
605 |
static int compact(lazymanifest *self) |
|
608 | static int compact(lazymanifest *self) | |
|
609 | { | |||
606 | int i; |
|
610 | int i; | |
607 | ssize_t need = 0; |
|
611 | ssize_t need = 0; | |
608 | char *data; |
|
612 | char *data; |
@@ -321,7 +321,8 b' quit:' | |||||
321 | /* |
|
321 | /* | |
322 | * Build a set of non-normal and other parent entries from the dirstate dmap |
|
322 | * Build a set of non-normal and other parent entries from the dirstate dmap | |
323 | */ |
|
323 | */ | |
324 |
static PyObject *nonnormalotherparententries(PyObject *self, PyObject *args) |
|
324 | static PyObject *nonnormalotherparententries(PyObject *self, PyObject *args) | |
|
325 | { | |||
325 | PyObject *dmap, *fname, *v; |
|
326 | PyObject *dmap, *fname, *v; | |
326 | PyObject *nonnset = NULL, *otherpset = NULL, *result = NULL; |
|
327 | PyObject *nonnset = NULL, *otherpset = NULL, *result = NULL; | |
327 | Py_ssize_t pos; |
|
328 | Py_ssize_t pos; | |
@@ -645,7 +646,8 b' bail:' | |||||
645 | } |
|
646 | } | |
646 |
|
647 | |||
647 |
|
648 | |||
648 |
static PyObject *fm1readmarkers(PyObject *self, PyObject *args) |
|
649 | static PyObject *fm1readmarkers(PyObject *self, PyObject *args) | |
|
650 | { | |||
649 | const char *data, *dataend; |
|
651 | const char *data, *dataend; | |
650 | int datalen; |
|
652 | int datalen; | |
651 | Py_ssize_t offset, stop; |
|
653 | Py_ssize_t offset, stop; |
@@ -407,7 +407,8 b' static PyObject *list_copy(PyObject *lis' | |||||
407 | return newlist; |
|
407 | return newlist; | |
408 | } |
|
408 | } | |
409 |
|
409 | |||
410 |
static int check_filter(PyObject *filter, Py_ssize_t arg) |
|
410 | static int check_filter(PyObject *filter, Py_ssize_t arg) | |
|
411 | { | |||
411 | if (filter) { |
|
412 | if (filter) { | |
412 | PyObject *arglist, *result; |
|
413 | PyObject *arglist, *result; | |
413 | int isfiltered; |
|
414 | int isfiltered; |
General Comments 0
You need to be logged in to leave comments.
Login now