From: Mark Wooding Date: Sat, 28 Jan 2006 19:03:25 +0000 (+0000) Subject: Bug squashing. X-Git-Url: https://git.distorted.org.uk/~mdw/pyke/commitdiff_plain/8d57d6ea0cd45e997bad93a878cd9579a272fbad Bug squashing. * Fix setting functions to check for null value (interpreted as property deletion) and raise an exception or do something else useful. * Fix conversion of read buffer to string so it returns the remainder rather than the whole thing. * Make conversions between MP and Python long work on PyObjects rather than PyLongObjects, to eliminate pointless type casts. * Fix primefield constructor argument parsing so that it doesn't crash! * Fix radix checking in MP conversions to exclude +/-1, and 0 for output. This turns into a little function now. * Do argument checking on Jacobi function. --- diff --git a/catacomb-python.h b/catacomb-python.h index 286dd9e..40ac758 100644 --- a/catacomb-python.h +++ b/catacomb-python.h @@ -296,8 +296,8 @@ extern PyTypeObject *gf_pytype; #define MP_PYCHECK(o) PyObject_TypeCheck((o), mp_pytype) #define GF_PYCHECK(o) PyObject_TypeCheck((o), gf_pytype) -extern mp *mp_frompylong(PyLongObject *); -extern PyLongObject *mp_topylong(mp *); +extern mp *mp_frompylong(PyObject *); +extern PyObject *mp_topylong(mp *); extern mp *tomp(PyObject *); extern mp *getmp(PyObject *); extern int convmp(PyObject *, void *);