mercurial/parsers.c
changeset 26008 59d57ea69ae6
parent 26007 1ebf4ac07582
child 26009 bbb698697efc
equal deleted inserted replaced
26007:1ebf4ac07582 26008:59d57ea69ae6
  1149 	}
  1149 	}
  1150 
  1150 
  1151 	/* Initialize internal datastructures */
  1151 	/* Initialize internal datastructures */
  1152 	tovisit = (int *)malloc((len + 1) * sizeof(int));
  1152 	tovisit = (int *)malloc((len + 1) * sizeof(int));
  1153 	if (tovisit == NULL) {
  1153 	if (tovisit == NULL) {
  1154 		PyErr_SetNone(PyExc_MemoryError);
  1154 		PyErr_NoMemory();
  1155 		goto release_reachable;
  1155 		goto release_reachable;
  1156 	}
  1156 	}
  1157 
  1157 
  1158 	seen = (char *)calloc(len+1, 1);
  1158 	seen = (char *)calloc(len+1, 1);
  1159 	if (seen == NULL) {
  1159 	if (seen == NULL) {
  1160 		PyErr_SetNone(PyExc_MemoryError);
  1160 		PyErr_NoMemory();
  1161 		goto release_seen_and_tovisit;
  1161 		goto release_seen_and_tovisit;
  1162 	}
  1162 	}
  1163 
  1163 
  1164 	/* Populate tovisit with all the heads */
  1164 	/* Populate tovisit with all the heads */
  1165 	numheads = PyList_GET_SIZE(heads);
  1165 	numheads = PyList_GET_SIZE(heads);