Show More
@@ -98,6 +98,7 b' static Py_ssize_t index_length(const ind' | |||||
98 |
|
98 | |||
99 | static PyObject *nullentry = NULL; |
|
99 | static PyObject *nullentry = NULL; | |
100 | static const char nullid[20] = {0}; |
|
100 | static const char nullid[20] = {0}; | |
|
101 | static const Py_ssize_t nullrev = -1; | |||
101 |
|
102 | |||
102 | static Py_ssize_t inline_scan(indexObject *self, const char **offsets); |
|
103 | static Py_ssize_t inline_scan(indexObject *self, const char **offsets); | |
103 |
|
104 | |||
@@ -308,7 +309,7 b' static PyObject *index_get(indexObject *' | |||||
308 | Py_ssize_t length = index_length(self); |
|
309 | Py_ssize_t length = index_length(self); | |
309 | PyObject *entry; |
|
310 | PyObject *entry; | |
310 |
|
311 | |||
311 |
if (pos == |
|
312 | if (pos == nullrev) { | |
312 | Py_INCREF(nullentry); |
|
313 | Py_INCREF(nullentry); | |
313 | return nullentry; |
|
314 | return nullentry; | |
314 | } |
|
315 | } | |
@@ -378,7 +379,7 b' static const char *index_node(indexObjec' | |||||
378 | Py_ssize_t length = index_length(self); |
|
379 | Py_ssize_t length = index_length(self); | |
379 | const char *data; |
|
380 | const char *data; | |
380 |
|
381 | |||
381 |
if (pos == |
|
382 | if (pos == nullrev) | |
382 | return nullid; |
|
383 | return nullid; | |
383 |
|
384 | |||
384 | if (pos >= length) |
|
385 | if (pos >= length) | |
@@ -701,7 +702,7 b' static PyObject *reachableroots2(indexOb' | |||||
701 | } |
|
702 | } | |
702 |
|
703 | |||
703 | /* Add its parents to the list of nodes to visit */ |
|
704 | /* Add its parents to the list of nodes to visit */ | |
704 |
if (revnum == |
|
705 | if (revnum == nullrev) | |
705 | continue; |
|
706 | continue; | |
706 | r = index_get_parents(self, revnum, parents, (int)len - 1); |
|
707 | r = index_get_parents(self, revnum, parents, (int)len - 1); | |
707 | if (r < 0) |
|
708 | if (r < 0) |
General Comments 0
You need to be logged in to leave comments.
Login now