##// END OF EJS Templates
reachableroots: unroll loop that checks if one of parents is reachable...
Yuya Nishihara -
r26059:8779ce81 default
parent child Browse files
Show More
@@ -1240,18 +1240,17 b' static PyObject *reachableroots2(indexOb'
1240 * index_get_parents */
1240 * index_get_parents */
1241 if (r < 0)
1241 if (r < 0)
1242 goto bail;
1242 goto bail;
1243 for (k = 0; k < 2; k++) {
1243 if (((revstates[parents[0] + 1] |
1244 if ((revstates[parents[k] + 1] & RS_REACHABLE)
1244 revstates[parents[1] + 1]) & RS_REACHABLE)
1245 && !(revstates[i + 1] & RS_REACHABLE)) {
1245 && !(revstates[i + 1] & RS_REACHABLE)) {
1246 revstates[i + 1] |= RS_REACHABLE;
1246 revstates[i + 1] |= RS_REACHABLE;
1247 val = PyInt_FromLong(i);
1247 val = PyInt_FromLong(i);
1248 if (val == NULL)
1248 if (val == NULL)
1249 goto bail;
1249 goto bail;
1250 r = PyList_Append(reachable, val);
1250 r = PyList_Append(reachable, val);
1251 Py_DECREF(val);
1251 Py_DECREF(val);
1252 if (r < 0)
1252 if (r < 0)
1253 goto bail;
1253 goto bail;
1254 }
1255 }
1254 }
1256 }
1255 }
1257 }
1256 }
General Comments 0
You need to be logged in to leave comments. Login now