Bug squashing.
authorMark Wooding <mdw@distorted.org.uk>
Sat, 28 Jan 2006 19:03:25 +0000 (19:03 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Sat, 28 Jan 2006 19:03:25 +0000 (19:03 +0000)
  * 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.

catacomb-python.h

index 286dd9e..40ac758 100644 (file)
@@ -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 *);