goto end;
Py_INCREF(q);
if (!PySequence_Check(q)) TYERR("want a sequence of residues");
- if (PySequence_Size(q) != n) VALERR("residue count mismatch");
+ i = PySequence_Size(q); if (i < 0) goto end;
+ if (i != n) VALERR("residue count mismatch");
v = xmalloc(n * sizeof(*v));
for (i = 0; i < n; i++) {
if ((x = PySequence_GetItem(q, i)) == 0) goto end;
goto end;
Py_INCREF(q);
if (!PySequence_Check(q)) TYERR("want a sequence of moduli");
- n = PySequence_Size(q);
- if (PyErr_Occurred()) goto end;
+ n = PySequence_Size(q); if (n < 0) goto end;
if (!n) VALERR("want at least one modulus");
v = xmalloc(n * sizeof(*v));
for (i = 0; i < n; i++) {