From: Alex M. <al...@us...> - 2002-03-01 08:19:47
|
Update of /cvsroot/gmpy/gmpy/src In directory usw-pr-cvs1:/tmp/cvs-serv27677/src Modified Files: gmpy.c Log Message: Updated towards 0.9b fixing a few minor code issues and the docs. Not yet able to build with gmp 4 (probably misinstalled gmp?). Index: gmpy.c =================================================================== RCS file: /cvsroot/gmpy/gmpy/src/gmpy.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** gmpy.c 24 Jan 2002 14:19:21 -0000 1.1.1.1 --- gmpy.c 1 Mar 2002 08:19:44 -0000 1.2 *************** *** 5,9 **** * Rewritten by Niels Möller, May 1996 * ! * Version for GMP-3, Python-2, with support for MSVC++6. * addition of mpf's, &c: Alex Martelli (al...@ya..., Nov 2000). * --- 5,9 ---- * Rewritten by Niels Möller, May 1996 * ! * Version for GMP-4, Python-2, with support for MSVC++6. * addition of mpf's, &c: Alex Martelli (al...@ya..., Nov 2000). * *************** *** 95,98 **** --- 95,101 ---- * fixed gcc warnings reported by K. Briggs * + * 0.9b: + * support GMP 4 + * */ #include <assert.h> *************** *** 316,320 **** last_try_self(const char* nm, int min, int max, PyObject* args, PyObject* self) { ! PyObject *funky_arg, *extype, *exvalue, *extb; int i; int tlen = PyTuple_Size(args); --- 319,323 ---- last_try_self(const char* nm, int min, int max, PyObject* args, PyObject* self) { ! PyObject *funky_arg=0, *extype, *exvalue, *extb; int i; int tlen = PyTuple_Size(args); *************** *** 327,331 **** break; } ! if(i>=tlen) { PyErr_Restore(extype, exvalue, extb); return 0; --- 330,334 ---- break; } ! if(i>=tlen || !funky_arg) { PyErr_Restore(extype, exvalue, extb); return 0; *************** *** 5129,5133 **** PympzObject *resob = Pympz_new(); if(resob) { ! mpz_set(resob->z, randstate->seed); result = (PyObject*)resob; } --- 5132,5136 ---- PympzObject *resob = Pympz_new(); if(resob) { ! mpz_set(resob->z, randstate->_mp_seed); result = (PyObject*)resob; } *************** *** 5292,5296 **** { "fac", Pygmpy_fac, 1, doc_fac }, { "fib", Pygmpy_fib, 1, doc_fib }, ! { "pi", Pygmpy_pi, 1 }, { "rand", Pygmpy_rand, 1, doc_rand }, --- 5295,5299 ---- { "fac", Pygmpy_fac, 1, doc_fac }, { "fib", Pygmpy_fib, 1, doc_fib }, ! { "pi", Pygmpy_pi, 1, doc_pi }, { "rand", Pygmpy_rand, 1, doc_rand }, |