summaryrefslogtreecommitdiffstats
path: root/Objects
Commit message (Collapse)AuthorAgeFilesLines
* Avoid undefined behaviour due to overflow in i_divmod (Objects/intobject.c).Mark Dickinson2009-12-041-1/+10
|
* disable pymalloc tricks with the --with-valgrind option #2422Benjamin Peterson2009-12-031-0/+39
| | | | Patch from James Henstridge.
* Issue #7406: Fix some occurrences of potential signed overflow in intMark Dickinson2009-12-021-3/+6
| | | | arithmetic.
* Issue #3382: Make '%F' and float.__format__('F') convert results to upper ↵Eric Smith2009-11-293-18/+0
| | | | case. Much of the patch came from Mark Dickinson.
* Include ieeefp.h (when available) in pyport.h instead of individually inMark Dickinson2009-11-282-8/+0
| | | | | | Objects/floatobject.c and Objects/complexobject.c. This should silence compiler warnings about implicit declaration of the 'finite' function on Solaris.
* Issue #7117, continued: Remove substitution of %g-style formatting forMark Dickinson2009-11-233-12/+0
| | | | | %f-style formatting, which used to occur at high precision. Float formatting should now be consistent between 2.7 and 3.1.
* Remove restriction on precision when formatting floats. This is theMark Dickinson2009-11-232-114/+42
| | | | | first step towards removing the %f -> %g switch (see issues 7117, 5859).
* #5037 proxy __unicode__ correctlyBenjamin Peterson2009-11-191-0/+17
|
* Issue 7263: Fix set.intersection() docstring.Raymond Hettinger2009-11-181-2/+2
|
* Issue #7117, continued: Change round implementation to use the ↵Mark Dickinson2009-11-181-0/+196
| | | | | | | | correctly-rounded string <-> float conversions; this makes sure that the result of the round operation is correctly rounded, and hence displays nicely using the new float repr.
* Silence another MSVC warning about unary minus.Mark Dickinson2009-11-161-1/+1
|
* Silence MSVC warning about unary minus applied to unsigned type.Mark Dickinson2009-11-161-1/+1
|
* Issue #7228: Add '%lld' and '%llu' support to PyFormat_FromString,Mark Dickinson2009-11-151-12/+59
| | | | PyFormat_FromStringV and PyErr_Format.
* Avoid signed overflow in some xrange calculations, and extendMark Dickinson2009-11-151-34/+44
| | | | | | xrange tests to cover some special cases that caused problems in py3k. This is a partial backport of r76292-76293 (see issue #7298.)
* grant list.index() a more informative error message #7252Benjamin Peterson2009-11-021-2/+16
|
* prevent a rather unlikely segfaultBenjamin Peterson2009-11-021-2/+8
|
* Issue #7117: Use PyOS_string_to_double instead of PyOS_ascii_strtod inMark Dickinson2009-10-261-16/+29
| | | | | complexobject.c. Also remove length restriction on unicode inputs to the complex constructor.
* Issue #7117: Use PyOS_string_to_double instead of PyOS_ascii_strtod inMark Dickinson2009-10-261-35/+24
| | | | | floatobject.c. Also, remove limitation on length of unicode inputs to float().
* Finished removing _PyOS_double_to_string, as mentioned in issue 7117.Eric Smith2009-10-262-17/+28
|
* Start to remove _PyOS_double_to_string, as mentioned in issue 7117.Eric Smith2009-10-261-22/+36
|
* Issue #1087418: Small performance boost for bitwise operations on longs.Mark Dickinson2009-10-251-66/+100
| | | | Initial patch by Gregory Smith; some tweaks added.
* Removed unused function PyFloat_AsStringEx. It is unused in floatobject.c, ↵Eric Smith2009-10-241-11/+0
| | | | and it's not declared in any .h file.
* rewrite for style, clarify, and commentsBenjamin Peterson2009-10-221-12/+15
| | | | Also, use the hasattr() like scheme of allowing BaseException exceptions through.
* whitespaceBenjamin Peterson2009-10-221-1/+1
|
* Removed usage of unsafe PyFloat_AsString.Eric Smith2009-10-161-7/+13
|
* Issue #7142: Fix uses of unicode in memoryview objectsMark Dickinson2009-10-151-2/+2
|
* only clear a module's __dict__ if the module is the only one with a ↵Benjamin Peterson2009-10-151-1/+4
| | | | reference to it #7140
* Fix missing semicolonMark Dickinson2009-10-151-1/+1
|
* #7116: str.join() takes an iterable.Georg Brandl2009-10-142-4/+4
|
* #7112: Fix compilation warning in unicodetype_db.hAmaury Forgeot d'Arc2009-10-131-109/+109
| | | | makeunicodedata now generates double literals
* Issue #7084: Fix a (very unlikely) crash when printing a list from oneAntoine Pitrou2009-10-111-1/+6
| | | | thread, and mutating it from another one. Patch by Scott Dial.
* #1571184: makeunicodedata.py now generates the functions _PyUnicode_ToNumeric,Amaury Forgeot d'Arc2009-10-062-1765/+2877
| | | | | | _PyUnicode_IsLinebreak and _PyUnicode_IsWhitespace. It now also parses the Unihan.txt for numeric values.
* Style/consistency/nano-optimization nit: replace occurrences ofMark Dickinson2009-09-281-6/+6
| | | | | | | | | | (high_bits << PyLong_SHIFT) + low_bits with (high_bits << PyLong_SHIFT) | low_bits in Objects/longobject.c. Motivation: - shouldn't unnecessarily mix bit ops with arithmetic ops (style) - this pattern should be spelt the same way thoughout (consistency) - it's very very very slightly faster: no need to worry about carries to the high digit (nano-optimization).
* http://bugs.python.org/issue6836Kristján Valur Jónsson2009-09-281-1/+1
| | | | A missing 'const' wasn't detected by Visual Studio.
* http://bugs.python.org/issue6836Kristján Valur Jónsson2009-09-281-17/+87
| | | | The debug memory api now keeps track of which external API (PyMem_* or PyObject_*) was used to allocate each block and treats any API violation as an error. Added separate _PyMem_DebugMalloc functions for the Py_Mem API instead of having it use the _PyObject_DebugMalloc functions.
* Issue #6713: Improve decimal int -> string conversions. Thanks GawainMark Dickinson2009-09-271-10/+28
| | | | Bolton for the suggestion and original patches.
* #6994: fix typo in enumerate docstringEzio Melotti2009-09-251-1/+1
|
* Silence MSVC compiler warnings.Mark Dickinson2009-09-211-2/+3
|
* backport keyword argument support for bytearray.decodeBenjamin Peterson2009-09-181-3/+4
|
* add keyword arguments support to str/unicode encode and decode #6300Benjamin Peterson2009-09-182-12/+20
|
* use macrosBenjamin Peterson2009-09-171-1/+1
|
* Issue #6922: Fix an infinite loop when trying to decode an invalidGeorg Brandl2009-09-171-1/+1
| | | | UTF-32 stream with a non-raising error handler like "replace" or "ignore".
* Issue #6713: Improve performance of str(n) and repr(n) for integers nMark Dickinson2009-09-161-0/+119
| | | | | (up to 3.1 times faster in tests), by special-casing base 10 in _PyLong_Format. (Backport of r74851 from py3k.)
* #6844: do not emit DeprecationWarnings on access if Exception.message has ↵Georg Brandl2009-09-161-18/+39
| | | | | | been set by the user. This works by always setting it in __dict__, except when it's implicitly set in __init__.
* Fix potential signed-overflow bug in _PyLong_Format; also fixMark Dickinson2009-09-131-9/+11
| | | | a couple of whitespace issues.
* Remove redundant assignmentMark Dickinson2009-09-061-1/+0
|
* Issue #6847: s/bytes/bytearray/ in some bytearray error messages. Thanks ↵Mark Dickinson2009-09-061-4/+4
| | | | Hagen Fürstenau.
* Issue #6846: bytearray.pop was returning ints in the range [-128, 128)Mark Dickinson2009-09-061-1/+1
| | | | instead of [0, 256). Thanks Hagen Fürstenau for the report and fix.
* remove the check that classmethod's argument is a callableBenjamin Peterson2009-09-012-10/+0
|
* Silence gcc 'comparison always false' warningMark Dickinson2009-08-282-2/+6
|