mercurial/parsers.c
branchstable
changeset 23945 33d6aaf84c9e
parent 23944 ec28f8b66e62
child 23946 f3e94aa6e182
equal deleted inserted replaced
23944:ec28f8b66e62 23945:33d6aaf84c9e
  1791 		long val;
  1791 		long val;
  1792 
  1792 
  1793 		if (!PyInt_Check(obj)) {
  1793 		if (!PyInt_Check(obj)) {
  1794 			PyErr_SetString(PyExc_TypeError,
  1794 			PyErr_SetString(PyExc_TypeError,
  1795 					"arguments must all be ints");
  1795 					"arguments must all be ints");
       
  1796 			Py_DECREF(obj);
  1796 			goto bail;
  1797 			goto bail;
  1797 		}
  1798 		}
  1798 		val = PyInt_AsLong(obj);
  1799 		val = PyInt_AsLong(obj);
       
  1800 		Py_DECREF(obj);
  1799 		if (val == -1) {
  1801 		if (val == -1) {
  1800 			ret = PyList_New(0);
  1802 			ret = PyList_New(0);
  1801 			goto done;
  1803 			goto done;
  1802 		}
  1804 		}
  1803 		if (val < 0 || val >= len) {
  1805 		if (val < 0 || val >= len) {