X-Git-Url: https://git.distorted.org.uk/~mdw/catacomb-python/blobdiff_plain/850a4b483975ef7081ea7fabfa2e90f99a1844a9..fbca05a1f15343b6e3a3b31edb3983e473fd7608:/rand.c?ds=sidebyside diff --git a/rand.c b/rand.c index 4b40a75..7f33e13 100644 --- a/rand.c +++ b/rand.c @@ -80,7 +80,7 @@ static PyObject *grmeth_byte(PyObject *me, PyObject *arg) static PyObject *grmeth_word(PyObject *me, PyObject *arg) { if (!PyArg_ParseTuple(arg, ":word")) return (0); - return (getu32(grand_word(GRAND_R(me)))); + return (getulong(grand_word(GRAND_R(me)))); } static PyObject *grmeth_range(PyObject *me, PyObject *arg) @@ -1076,7 +1076,7 @@ static PyObject *bbsmeth_bits(PyObject *me, PyObject *arg) grand *r = GRAND_R(me); unsigned n; uint32 w; if (!PyArg_ParseTuple(arg, "O&:bits", convuint, &n)) goto end; if (n > 32) VALERR("can't get more than 32 bits"); - r->ops->misc(r, BBS_BITS, n, &w); return (getu32(w)); + r->ops->misc(r, BBS_BITS, n, &w); return (getulong(w)); end: return (0); }