##// END OF EJS Templates
parsers: check results of PyInt_FromLong (issue4771)
Bryan O'Sullivan -
r27365:ec04370b default
parent child Browse files
Show More
@@ -1333,16 +1333,23 b' static PyObject *compute_phases_map_sets'
1333 if (phaseslist == NULL)
1333 if (phaseslist == NULL)
1334 goto release;
1334 goto release;
1335 for (i = 0; i < len; i++) {
1335 for (i = 0; i < len; i++) {
1336 PyObject *phaseval;
1337
1336 phase = phases[i];
1338 phase = phases[i];
1337 /* We only store the sets of phase for non public phase, the public phase
1339 /* We only store the sets of phase for non public phase, the public phase
1338 * is computed as a difference */
1340 * is computed as a difference */
1339 if (phase != 0) {
1341 if (phase != 0) {
1340 phaseset = PyList_GET_ITEM(phasessetlist, phase);
1342 phaseset = PyList_GET_ITEM(phasessetlist, phase);
1341 rev = PyInt_FromLong(i);
1343 rev = PyInt_FromLong(i);
1344 if (rev == NULL)
1345 goto release;
1342 PySet_Add(phaseset, rev);
1346 PySet_Add(phaseset, rev);
1343 Py_XDECREF(rev);
1347 Py_XDECREF(rev);
1344 }
1348 }
1345 PyList_SET_ITEM(phaseslist, i, PyInt_FromLong(phase));
1349 phaseval = PyInt_FromLong(phase);
1350 if (phaseval == NULL)
1351 goto release;
1352 PyList_SET_ITEM(phaseslist, i, phaseval);
1346 }
1353 }
1347 ret = PyList_New(2);
1354 ret = PyList_New(2);
1348 if (ret == NULL)
1355 if (ret == NULL)
General Comments 0
You need to be logged in to leave comments. Login now