Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 863983e commit 9a9c436Copy full SHA for 9a9c436
1 file changed
Modules/_randommodule.c
@@ -213,6 +213,7 @@ random_seed(RandomObject *self, PyObject *args)
213
unsigned long *key = NULL;
214
unsigned long keymax; /* # of allocated slots in key */
215
unsigned long keyused; /* # of used slots in key */
216
+ int err;
217
218
PyObject *arg = NULL;
219
@@ -261,11 +262,13 @@ random_seed(RandomObject *self, PyObject *args)
261
262
thirtytwo = PyInt_FromLong(32L);
263
if (thirtytwo == NULL)
264
goto Done;
- while (PyObject_IsTrue(n)) {
265
+ while ((err=PyObject_IsTrue(n))) {
266
PyObject *newn;
267
PyObject *pychunk;
268
unsigned long chunk;
269
270
+ if (err == -1)
271
+ goto Done;
272
pychunk = PyNumber_And(n, masklower);
273
if (pychunk == NULL)
274
0 commit comments