summaryrefslogtreecommitdiff
path: root/Modules/mpzmodule.c
AgeCommit message (Collapse)AuthorLines
2002-03-05backport gvanrossum's checkin ofMichael W. Hudson-1/+1
revision 2.40 of mpzmodule.c SF patch 517245 by Marc Recht. Support GMP version >= 2. Bugfix candidate.
2001-12-08Patch supplied by Burton Radons for his own SF bug #487390: ModifyingGuido van Rossum-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.
2001-07-15Python.h: Don't attempt to redefine NDEBUG if it's already defined.Tim Peters-1/+0
Others: Remove redundant includes of assert.h.
2001-02-12Richard Fish <rfish@users.sourceforge.net>:Fred Drake-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.
2001-02-06Patch #103523, to make mpz module compile with CygwinAndrew M. Kuchling-1/+2
2000-10-11Another gcc -Wall warning squashed:Fred Drake-1/+1
MPZ_divm(): Initialize mpzden to NULL, since it could be Py_XDECREF()ed without being initialized.
2000-09-01REMOVED all CWI, CNRI and BeOpen copyright markings.Guido van Rossum-9/+0
This should match the situation in the 1.6b1 tree.
2000-09-01Do the absolute minimal amount of modifications to eradicateBarry Warsaw-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
2000-07-21Bunch of minor ANSIfications: 'void initfunc()' -> 'void initfunc(void)',Thomas Wouters-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 ;)
2000-07-16Spelling fixes supplied by Rob W. W. Hooft. All these are fixes in eitherThomas Wouters-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 ;)
2000-07-10ANSI-fication, added #ifdef construction in mpz_coercePeter Schneider-Kamp-138/+54
2000-07-09Nuke all remaining occurrences of Py_PROTO and Py_FPROTO.Tim Peters-2/+2
2000-06-30Change copyright notice - 2nd try.Guido van Rossum-6/+0
2000-06-30Change copyright notice.Guido van Rossum-21/+6
2000-06-30Trent Mick <trentm@activestate.com>:Fred Drake-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.
2000-06-28Trent Mick: use size_t instead of int where appropriate (mpz_format()).Guido van Rossum-1/+1
2000-05-03Vladimir Marangozov's long-awaited malloc restructuring.Guido van Rossum-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.)
2000-02-25Better fix for mpzmodule problem reported by Peter Funk: just useAndrew M. Kuchling-6/+2
mp_bits_per_limb with GMP 2.0
2000-02-24Peter Funk:Guido van Rossum-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.
1998-12-14Fixed bug reported to Gregor Hoffleit:Andrew M. Kuchling-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.
1998-12-04Add DL_EXPORT() to all modules that could possibly be usedGuido van Rossum-1/+1
on BeOS or Windows.
1998-10-08Use the t# format where appropriate. Greg Stein.Guido van Rossum-5/+2
1998-04-03Export MPZType -- the type of mpz objects....Fred Drake-1/+9
1997-12-15Untested change to include gmp-mparam.h instead of gmp-impl.h.Guido van Rossum-1/+1
Chris Lawrence <quango@ix.netcom.com>
1997-08-17Use a trick to make the test for GMP v2 to work when GMP v1 definesGuido van Rossum-1/+1
__GNU_MP__ as empty: #if __GNU_MP__ + 0 == 2 (Untested.)
1997-03-14New form of PyFPE_END_PROTECT macro.Guido van Rossum-1/+1
1997-02-14Changes for Lee Busby's SIGFPE patch set.Guido van Rossum-0/+3
Two new modules fpectl and fpetest. Surround various and sundry f.p. operations with PyFPE_*_PROTECT macros.
1996-12-09Renamed a few symbols that were found in comments.Barry Warsaw-6/+6
1996-12-09Renamed, ungrandly. We don't have the GNU MP library here so we can'tBarry Warsaw-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!
1996-10-25New permission notice, includes CNRI.Guido van Rossum-12/+19
1996-08-19Changes by Rob Hooft for GMP 2.0.2Guido van Rossum-10/+29
1995-02-10add some castsGuido van Rossum-3/+3
1995-01-10cosmetic changes so these modules will work with the strict new naming schemeGuido van Rossum-2/+1
1995-01-04Added 1995 to copyright message.Guido van Rossum-2/+2
Setup.in: clarified Tk comments somewhat. structmodule.c: use memcpy() instead of double precision assignment.
1995-01-02Another bulky set of minor changes.Guido van Rossum-5/+19
Note addition of gethostbyaddr() and improved repr() for sockets, renaming of md5.md5() to md5.new(), and fixing of leaks in threads.
1994-08-01Merge alpha100 branch back to main trunkGuido van Rossum-18/+22
1993-12-17* mpzmodule.c: cast some methods to the proper type.Guido van Rossum-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().
1993-11-05* mpzmodule.c: removed redundant mpz_print function.Guido van Rossum-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!)
1992-12-14* mymalloc.h: always allocate one extra byte, since some malloc'sGuido van Rossum-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().