##// END OF EJS Templates
changelog: move index_get_parents function up...
Laurent Charignon -
r25280:8c8af4d8 default
parent child Browse files
Show More
@@ -1177,6 +1177,20 b' release_none:'
1177 return ret;
1177 return ret;
1178 }
1178 }
1179
1179
1180 static inline void index_get_parents(indexObject *self, int rev, int *ps)
1181 {
1182 if (rev >= self->length - 1) {
1183 PyObject *tuple = PyList_GET_ITEM(self->added,
1184 rev - self->length + 1);
1185 ps[0] = (int)PyInt_AS_LONG(PyTuple_GET_ITEM(tuple, 5));
1186 ps[1] = (int)PyInt_AS_LONG(PyTuple_GET_ITEM(tuple, 6));
1187 } else {
1188 const char *data = index_deref(self, rev);
1189 ps[0] = getbe32(data + 24);
1190 ps[1] = getbe32(data + 28);
1191 }
1192 }
1193
1180 static PyObject *index_headrevs(indexObject *self, PyObject *args)
1194 static PyObject *index_headrevs(indexObject *self, PyObject *args)
1181 {
1195 {
1182 Py_ssize_t i, len, addlen;
1196 Py_ssize_t i, len, addlen;
@@ -1690,20 +1704,6 b' static int index_contains(indexObject *s'
1690 }
1704 }
1691 }
1705 }
1692
1706
1693 static inline void index_get_parents(indexObject *self, int rev, int *ps)
1694 {
1695 if (rev >= self->length - 1) {
1696 PyObject *tuple = PyList_GET_ITEM(self->added,
1697 rev - self->length + 1);
1698 ps[0] = (int)PyInt_AS_LONG(PyTuple_GET_ITEM(tuple, 5));
1699 ps[1] = (int)PyInt_AS_LONG(PyTuple_GET_ITEM(tuple, 6));
1700 } else {
1701 const char *data = index_deref(self, rev);
1702 ps[0] = getbe32(data + 24);
1703 ps[1] = getbe32(data + 28);
1704 }
1705 }
1706
1707 typedef uint64_t bitmask;
1707 typedef uint64_t bitmask;
1708
1708
1709 /*
1709 /*
General Comments 0
You need to be logged in to leave comments. Login now