From: Alex M. <al...@us...> - 2005-11-07 15:43:33
|
Update of /cvsroot/gmpy/gmpy/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8213/src Modified Files: gmpy.c Log Message: Added CVS Id Index: gmpy.c =================================================================== RCS file: /cvsroot/gmpy/gmpy/src/gmpy.c,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** gmpy.c 7 Nov 2005 05:29:24 -0000 1.14 --- gmpy.c 7 Nov 2005 15:43:24 -0000 1.15 *************** *** 112,119 **** * fixed memory leak on divm * fixed bug on mpq('123') [[str2mpq on string w/o a slash]] ! * added floordiv and truediv operators (to mpz only) * * TODO: look deeper into divm (when operands are not mutually prime) ! * add floordiv and truediv to mpq and mpf * */ --- 112,119 ---- * fixed memory leak on divm * fixed bug on mpq('123') [[str2mpq on string w/o a slash]] ! * added floordiv and truediv operators * * TODO: look deeper into divm (when operands are not mutually prime) ! * add tests of floordiv and truediv * */ *************** *** 142,145 **** --- 142,147 ---- char gmpy_version[] = "1.01"; + char _gmpy_cvs[] = "$Id$"; + /* * we do have a dependence on Python's internals, specifically: *************** *** 499,503 **** } /* Pympz_dealloc */ ! /* return GMPY, resp. GMP, versions, as strings */ static char doc_version[]="\ version(): returns string giving current GMPY version\n\ --- 501,505 ---- } /* Pympz_dealloc */ ! /* return GMPY, resp. GMP, versions, or CVS Id, as strings */ static char doc_version[]="\ version(): returns string giving current GMPY version\n\ *************** *** 509,512 **** --- 511,523 ---- return Py_BuildValue("s", gmpy_version); } + static char doc_cvsid[]="\ + _cvsid(): returns string giving current GMPY cvs Id\n\ + "; + static PyObject * + Pygmpy_get_cvsid(PyObject *self, PyObject *args) + { + NO_ARGS(); + return Py_BuildValue("s", _gmpy_cvs); + } static char doc_gmp_version[]="\ gmp_version(): returns string giving current GMP version\n\ *************** *** 5431,5434 **** --- 5442,5446 ---- { { "version", Pygmpy_get_version, 1, doc_version }, + { "_cvsid", Pygmpy_get_cvsid, 1, doc_cvsid }, { "gmp_version", Pygmpy_get_gmp_version, 1, doc_gmp_version }, { "set_debug", Pygmpy_set_debug, 1, doc_set_debug }, |