summaryrefslogtreecommitdiffstats
path: root/Modules/mpzmodule.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove METH_OLDARGS:Neal Norwitz2002-03-311-60/+7
| | | | | | | Convert METH_OLDARGS -> METH_VARARGS: also PyArg_Parse -> PyArg_ParseTuple Convert METH_OLDARGS -> METH_NOARGS: remove args parameter Please review. All tests pass, but some modules don't have tests. I spot checked various functions to try to make sure nothing broke.
* SF patch 517245 by Marc Recht.Guido van Rossum2002-03-011-1/+1
| | | | | | Support GMP version >= 2. Bugfix candidate.
* Patch #477750: Use METH_ constants in Modules.Martin v. Löwis2002-01-171-8/+8
|
* Patch supplied by Burton Radons for his own SF bug #487390: ModifyingGuido van Rossum2001-12-081-1/+1
| | | | | | | | | | | | | type.__module__ behavior. This adds the module name and a dot in front of the type name in every type object initializer, except for built-in types (and those that already had this). Note that it touches lots of Mac modules -- I have no way to test these but the changes look right. Apologies if they're not. This also touches the weakref docs, which contains a sample type object initializer. It also touches the mmap test output, because the mmap type's repr is included in that output. It touches object.h to put the correct description in a comment.
* Python.h: Don't attempt to redefine NDEBUG if it's already defined.Tim Peters2001-07-151-1/+0
| | | | Others: Remove redundant includes of assert.h.
* Richard Fish <rfish@users.sourceforge.net>:Fred Drake2001-02-121-33/+39
| | | | | | | | Fix the .binary() method of mpz objects for 64-bit systems. [Also removed a lot of trailing whitespace elsewhere in the file. --FLD] This closes SF patch #103547.
* Patch #103523, to make mpz module compile with CygwinAndrew M. Kuchling2001-02-061-1/+2
|
* Another gcc -Wall warning squashed:Fred Drake2000-10-111-1/+1
| | | | | MPZ_divm(): Initialize mpzden to NULL, since it could be Py_XDECREF()ed without being initialized.
* REMOVED all CWI, CNRI and BeOpen copyright markings.Guido van Rossum2000-09-011-9/+0
| | | | This should match the situation in the 1.6b1 tree.
* Do the absolute minimal amount of modifications to eradicateBarry Warsaw2000-09-011-4/+6
| | | | | | | | | | | | | | | Py_FatalError() from module initialization functions. The importing mechanism already checks for PyErr_Occurred() after module importation and it Does The Right Thing. Unfortunately, the following either were not compiled or tested by the regression suite, due to issues with my development platform: almodule.c cdmodule.c mpzmodule.c puremodule.c timingmodule.c
* Bunch of minor ANSIfications: 'void initfunc()' -> 'void initfunc(void)',Thomas Wouters2000-07-211-4/+3
| | | | | | | | | | | | | | | | | | and a couple of functions that were missed in the previous batches. Not terribly tested, but very carefully scrutinized, three times. All these were found by the little findkrc.py that I posted to python-dev, which means there might be more lurking. Cases such as this: long func(a, b) long a; long b; /* flagword */ { and other cases where the last ; in the argument list isn't followed by a newline and an opening curly bracket. Regexps to catch all are welcome, of course ;)
* Spelling fixes supplied by Rob W. W. Hooft. All these are fixes in eitherThomas Wouters2000-07-161-2/+2
| | | | | | | | | | comments, docstrings or error messages. I fixed two minor things in test_winreg.py ("didn't" -> "Didn't" and "Didnt" -> "Didn't"). There is a minor style issue involved: Guido seems to have preferred English grammar (behaviour, honour) in a couple places. This patch changes that to American, which is the more prominent style in the source. I prefer English myself, so if English is preferred, I'd be happy to supply a patch myself ;)
* ANSI-fication, added #ifdef construction in mpz_coercePeter Schneider-Kamp2000-07-101-138/+54
|
* Nuke all remaining occurrences of Py_PROTO and Py_FPROTO.Tim Peters2000-07-091-2/+2
|
* Change copyright notice - 2nd try.Guido van Rossum2000-06-301-6/+0
|
* Change copyright notice.Guido van Rossum2000-06-301-22/+7
|
* Trent Mick <trentm@activestate.com>:Fred Drake2000-06-301-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | The common technique for printing out a pointer has been to cast to a long and use the "%lx" printf modifier. This is incorrect on Win64 where casting to a long truncates the pointer. The "%p" formatter should be used instead. The problem as stated by Tim: > Unfortunately, the C committee refused to define what %p conversion "looks > like" -- they explicitly allowed it to be implementation-defined. Older > versions of Microsoft C even stuck a colon in the middle of the address (in > the days of segment+offset addressing)! The result is that the hex value of a pointer will maybe/maybe not have a 0x prepended to it. Notes on the patch: There are two main classes of changes: - in the various repr() functions that print out pointers - debugging printf's in the various thread_*.h files (these are why the patch is large) Closes SourceForge patch #100505.
* Trent Mick: use size_t instead of int where appropriate (mpz_format()).Guido van Rossum2000-06-281-1/+1
|
* Vladimir Marangozov's long-awaited malloc restructuring.Guido van Rossum2000-05-031-2/+2
| | | | | | | | | | For more comments, read the patches@python.org archives. For documentation read the comments in mymalloc.h and objimpl.h. (This is not exactly what Vladimir posted to the patches list; I've made a few changes, and Vladimir sent me a fix in private email for a problem that only occurs in debug mode. I'm also holding back on his change to main.c, which seems unnecessary to me.)
* Better fix for mpzmodule problem reported by Peter Funk: just useAndrew M. Kuchling2000-02-251-6/+2
| | | | mp_bits_per_limb with GMP 2.0
* Peter Funk:Guido van Rossum2000-02-241-0/+5
| | | | | | | This patch allows building the Python 'mpzmodule' under SuSE Linux without having to install the source package of the GMP-libary. The gmp-mparam.h seems to be an internal header file. The patch shouldn't hurt any other platforms.
* Fixed bug reported to Gregor Hoffleit:Andrew M. Kuchling1998-12-141-1/+1
| | | | | | | > mpz.mpz('\xff') should return mpz(255). Instead it returns > mpz(4294967295L). Looks like the constructor doesn't work with strings > containing characters above chr(128). Caused by using just 'char' where 'unsigned char' should have been used.
* Add DL_EXPORT() to all modules that could possibly be usedGuido van Rossum1998-12-041-1/+1
| | | | on BeOS or Windows.
* Use the t# format where appropriate. Greg Stein.Guido van Rossum1998-10-081-5/+2
|
* Export MPZType -- the type of mpz objects....Fred Drake1998-04-031-1/+9
|
* Untested change to include gmp-mparam.h instead of gmp-impl.h.Guido van Rossum1997-12-151-1/+1
| | | | Chris Lawrence <quango@ix.netcom.com>
* Use a trick to make the test for GMP v2 to work when GMP v1 definesGuido van Rossum1997-08-171-1/+1
| | | | | __GNU_MP__ as empty: #if __GNU_MP__ + 0 == 2 (Untested.)
* New form of PyFPE_END_PROTECT macro.Guido van Rossum1997-03-141-1/+1
|
* Changes for Lee Busby's SIGFPE patch set.Guido van Rossum1997-02-141-0/+3
| | | | | Two new modules fpectl and fpetest. Surround various and sundry f.p. operations with PyFPE_*_PROTECT macros.
* Renamed a few symbols that were found in comments.Barry Warsaw1996-12-091-6/+6
|
* Renamed, ungrandly. We don't have the GNU MP library here so we can'tBarry Warsaw1996-12-091-278/+291
| | | | | | really test this module, or even compile it without a lot of work. I'll make a note of it that this has not been tested!
* New permission notice, includes CNRI.Guido van Rossum1996-10-251-13/+20
|
* Changes by Rob Hooft for GMP 2.0.2Guido van Rossum1996-08-191-10/+29
|
* add some castsGuido van Rossum1995-02-101-3/+3
|
* cosmetic changes so these modules will work with the strict new naming schemeGuido van Rossum1995-01-101-2/+1
|
* Added 1995 to copyright message.Guido van Rossum1995-01-041-2/+2
| | | | | Setup.in: clarified Tk comments somewhat. structmodule.c: use memcpy() instead of double precision assignment.
* Another bulky set of minor changes.Guido van Rossum1995-01-021-5/+19
| | | | | Note addition of gethostbyaddr() and improved repr() for sockets, renaming of md5.md5() to md5.new(), and fixing of leaks in threads.
* Merge alpha100 branch back to main trunkGuido van Rossum1994-08-011-18/+22
|
* * mpzmodule.c: cast some methods to the proper type.Guido van Rossum1993-12-171-6/+8
| | | | | | | * traceback.c (tb_print): use sys.tracebacklimit as a maximum number of traceback entries to print (default 1000). * ceval.c (printtraceback): Don't print stack trace header -- this is now done by tb_print().
* * mpzmodule.c: removed redundant mpz_print function.Guido van Rossum1993-11-051-19/+1
| | | | | | | | | | | | | | * object.[ch], bltinmodule.c, fileobject.c: changed str() to call strobject() which calls an object's __str__ method if it has one. strobject() is also called by writeobject() when PRINT_RAW is passed. * ceval.c: rationalize code for PRINT_ITEM (no change in function!) * funcobject.c, codeobject.c: added compare and hash functionality. Functions with identical code objects and the same global dictionary are equal. Code objects are equal when their code, constants list and names list are identical (i.e. the filename and code name don't count). (hash doesn't work yet since the constants are in a list and lists can't be hashed -- suppose this should really be done with a tuple now we have resizetuple!)
* * mymalloc.h: always allocate one extra byte, since some malloc'sGuido van Rossum1992-12-141-0/+1808
return NULL for malloc(0) or realloc(p, 0). (This should be done differently than wasting one byte, but alas...) * Moved "add'l libraries" option in Makefile to an earlier place. * Remove argument compatibility hacks (b) and (c). * Add grey2mono, dither2mono and mono2grey to imageop. * Dup the fd in socket.fromfd(). * Added new modules mpz, md5 (by JH, requiring GNU MP 1.2). Affects Makefile and config.c. * socketmodule.c: added socket.fromfd(fd, family, type, [proto]), converted socket() to use of getargs().