summaryrefslogtreecommitdiff
path: root/Python/mystrtoul.c
Commit message (Collapse)AuthorAgeFilesLines
* Bug #1334662 / patch #1335972: int(string, base) wrong answers.Tim Peters2006-05-231-88/+178
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In rare cases of strings specifying true values near sys.maxint, and oddball bases (not decimal or a power of 2), int(string, base) could deliver insane answers. This repairs all such problems, and also speeds string->int significantly. On my box, here are % speedups for decimal strings of various lengths: length speedup ------ ------- 1 12.4% 2 15.7% 3 20.6% 4 28.1% 5 33.2% 6 37.5% 7 41.9% 8 46.3% 9 51.2% 10 19.5% 11 19.9% 12 23.9% 13 23.7% 14 23.3% 15 24.9% 16 25.3% 17 28.3% 18 27.9% 19 35.7% Note that the difference between 9 and 10 is the difference between short and long Python ints on a 32-bit box. The patch doesn't actually do anything to speed conversion to long: the speedup is due to detecting "unsigned long" overflow more quickly. This is a bugfix candidate, but it's a non-trivial patch and it would be painful to separate the "bug fix" from the "speed up" parts.
* Getting rid of support for the ancient Apple MPW compiler.Jack Jansen2003-11-191-2/+0
|
* 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.
* Mass ANSIfication of function definitions. Doesn't cover all 'extern'Thomas Wouters2000-07-221-8/+2
| | | | declarations yet, those come later.
* Change copyright notice - 2nd try.Guido van Rossum2000-06-301-6/+0
|
* Change copyright notice.Guido van Rossum2000-06-301-22/+7
|
* Changes by Mark Hammond for Windows CE. Mostly of the formGuido van Rossum1999-04-071-0/+2
| | | | #ifdef DONT_HAVE_header_H ... #endif around #include <header.h>.
* Chris H. writes:Guido van Rossum1998-12-181-1/+1
| | | | | If we're going to put the PyOS_strtol() proto in intobject.h we should include it here or the symbol isn't exported on PowerPC.
* Sigh. The hack to enable special treatment for errno on SGI machinesGuido van Rossum1998-07-071-0/+4
| | | | | | | | | must be enabled here, otherwise the errno we set on overflows is not the errno that's being read by compile.c. Wonder how many other files that do their own "#include config.h" need this too :-( (Because of the structure of autoconf, it's not so simple to get this into config.h...)
* Address warnings issued by the MSVC++ compilerGuido van Rossum1998-04-101-1/+1
|
* For base 10, cast unsigned long to long before testing overflow.Guido van Rossum1997-12-151-2/+8
| | | | This prevents 4294967296 from being an acceptable way to spell zero!
* Oops, missed some renamings.Guido van Rossum1997-05-071-5/+3
|
* Tweaks to keep the Microsoft compiler quier.Guido van Rossum1997-04-091-1/+1
|
* Keep gcc -Wall happy.Guido van Rossum1996-12-051-1/+1
|
* New permission notice, includes CNRI.Guido van Rossum1996-10-251-13/+20
|
* Always include config.hGuido van Rossum1996-08-191-2/+0
|
* Put definition of _REENTRANT in config.hGuido van Rossum1996-08-011-4/+0
|
* Added _REENTRANT definitionGuido van Rossum1996-07-311-0/+4
|
* use Py_CHARMASKGuido van Rossum1995-02-101-3/+11
|
* include rename2.hGuido van Rossum1995-01-171-0/+2
|
* Added 1995 to copyright message.Guido van Rossum1995-01-041-2/+2
| | | | | | bltinmodule.c: fixed coerce() nightmare in ternary pow(). modsupport.c (initmodule2): pass METH_FREENAME flag to newmethodobject(). pythonrun.c: move flushline() into and around print_error().
* Merge alpha100 branch back to main trunkGuido van Rossum1994-08-011-4/+12
|
* New files.Guido van Rossum1993-12-241-0/+156