chiark
/
gitweb
/
~mdw
/
catacomb-python
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
catacomb/__init__.py: Import `sys' as a whole.
[catacomb-python]
/
rand.c
diff --git
a/rand.c
b/rand.c
index 6fe78bc758990ac36022447731243d3cc1fd714e..7e091b02464c8503907126cd7fa22fa6d03c35ef 100644
(file)
--- a/
rand.c
+++ b/
rand.c
@@
-1249,7
+1249,7
@@
static PyObject *bbsget_x(PyObject *me, void *hunoz)
static int bbsset_x(PyObject *me, PyObject *val, void *hunoz)
{
static int bbsset_x(PyObject *me, PyObject *val, void *hunoz)
{
- mp *x = 0; grand *r = GRAND_R(me); int rc = -1; if (!
x
) NIERR("__del__");
+ mp *x = 0; grand *r = GRAND_R(me); int rc = -1; if (!
val
) NIERR("__del__");
if ((x = getmp(val)) == 0) goto end; r->ops->misc(r, BBS_SET, x); rc = 0;
end: mp_drop(x); return (rc);
}
if ((x = getmp(val)) == 0) goto end; r->ops->misc(r, BBS_SET, x); rc = 0;
end: mp_drop(x); return (rc);
}
@@
-1384,6
+1384,7
@@
static PyObject *meth__BBSPriv_generate(PyObject *me,
rc->bp.n = MP_COPY(bp.n);
end:
mp_drop(bp.p); mp_drop(bp.q); mp_drop(bp.n); mp_drop(x);
rc->bp.n = MP_COPY(bp.n);
end:
mp_drop(bp.p); mp_drop(bp.q); mp_drop(bp.n); mp_drop(x);
+ droppgev(&evt);
return ((PyObject *)rc);
}
return ((PyObject *)rc);
}
@@
-1489,7
+1490,8
@@
static PyTypeObject bbspriv_pytype_skel = {
static PyMethodDef methods[] = {
#define METHNAME(name) meth_##name
KWMETH(_BBSPriv_generate, "\
static PyMethodDef methods[] = {
#define METHNAME(name) meth_##name
KWMETH(_BBSPriv_generate, "\
-generate(NBITS, [event = pgen_nullev, rng = rand, nsteps = 0, seed = 2])")
+generate(NBITS, [event = pgen_nullev], [rng = rand],\n\
+ [nsteps = 0], [seed = 2]) -> R")
#undef METHNAME
{ 0 }
};
#undef METHNAME
{ 0 }
};