if (grand_check(me)) return (0);
if (PyInt_Check(m)) {
long mm = PyInt_AS_LONG(m);
- if (mm <= 0)
- goto notpos;
- if (mm <= 0xffffffff)
+ if (mm <= 0) goto notpos;
+ else if (mm <= 0xffffffff)
return (PyInt_FromLong(grand_range(GRAND_R(me), mm)));
}
- if ((x = getmp(m)) == 0)
- goto end;
- if (!MP_POSP(x))
- goto notpos;
+ if ((x = getmp(m)) == 0) goto end;
+ if (!MP_POSP(x)) goto notpos;
y = mprand_range(MP_NEW, x, GRAND_R(me), 0);
MP_DROP(x);
return (mp_pywrap(y));