Show More
@@ -643,8 +643,10 b' static PyObject *compute_phases_map_sets' | |||||
643 |
|
643 | |||
644 | if (!PyArg_ParseTuple(args, "O", &roots)) |
|
644 | if (!PyArg_ParseTuple(args, "O", &roots)) | |
645 | goto done; |
|
645 | goto done; | |
646 | if (roots == NULL || !PyList_Check(roots)) |
|
646 | if (roots == NULL || !PyList_Check(roots)) { | |
|
647 | PyErr_SetString(PyExc_TypeError, "roots must be a list"); | |||
647 | goto done; |
|
648 | goto done; | |
|
649 | } | |||
648 |
|
650 | |||
649 | phases = calloc(len, 1); /* phase per rev: {0: public, 1: draft, 2: secret} */ |
|
651 | phases = calloc(len, 1); /* phase per rev: {0: public, 1: draft, 2: secret} */ | |
650 | if (phases == NULL) { |
|
652 | if (phases == NULL) { | |
@@ -667,8 +669,11 b' static PyObject *compute_phases_map_sets' | |||||
667 | if (phaseset == NULL) |
|
669 | if (phaseset == NULL) | |
668 | goto release; |
|
670 | goto release; | |
669 | PyList_SET_ITEM(phasessetlist, i+1, phaseset); |
|
671 | PyList_SET_ITEM(phasessetlist, i+1, phaseset); | |
670 | if (!PyList_Check(phaseroots)) |
|
672 | if (!PyList_Check(phaseroots)) { | |
|
673 | PyErr_SetString(PyExc_TypeError, | |||
|
674 | "roots item must be a list"); | |||
671 | goto release; |
|
675 | goto release; | |
|
676 | } | |||
672 | minrevphase = add_roots_get_min(self, phaseroots, i+1, phases); |
|
677 | minrevphase = add_roots_get_min(self, phaseroots, i+1, phases); | |
673 | if (minrevphase == -2) /* Error from add_roots_get_min */ |
|
678 | if (minrevphase == -2) /* Error from add_roots_get_min */ | |
674 | goto release; |
|
679 | goto release; |
General Comments 0
You need to be logged in to leave comments.
Login now