Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | bpo-31619: Fixed integer overflow in converting huge strings to int. ↵ | Miss Islington (bot) | 2017-12-03 | 1 | -3/+11 |
| | | | | | (GH-3884) (#4690) (cherry picked from commit 29ba688034fc4eef0693b86002cf7bee55d692af) | ||||
* | bpo-16055: Fixes incorrect error text for int('1', base=1000) (GH-4376) (#4389) | Miss Islington (bot) | 2017-11-14 | 1 | -1/+1 |
| | | | (cherry picked from commit 28b624825eb92cb8c96fbf8da267d8d14a61a841) | ||||
* | [3.6] bpo-31619: Fixed a ValueError when convert a string with large number ↵ | Miss Islington (bot) | 2017-10-03 | 1 | -4/+4 |
| | | | | | | of underscores (GH-3827) (#3863) to integer with binary base. (cherry picked from commit 85c0b8941f0c8ef3ed787c9d504712c6ad3eb5d3) | ||||
* | Issue #28701: Replace PyUnicode_CompareWithASCIIString with ↵ | Serhiy Storchaka | 2016-11-16 | 1 | -4/+4 |
|\ | | | | | | | | | | | _PyUnicode_EqualToASCIIString. The latter function is more readable, faster and doesn't raise exceptions. | ||||
| * | Issue #28701: Replace PyUnicode_CompareWithASCIIString with ↵ | Serhiy Storchaka | 2016-11-16 | 1 | -4/+4 |
| | | | | | | | | | | | | _PyUnicode_EqualToASCIIString. The latter function is more readable, faster and doesn't raise exceptions. | ||||
* | | Issue #25221: merge from 3.5. | Mark Dickinson | 2016-09-10 | 1 | -1/+2 |
|\ \ | |/ | |||||
| * | Issue #25221: Fix corrupted result from PyLong_FromLong(0) when Python is ↵ | Mark Dickinson | 2016-09-10 | 1 | -1/+2 |
| | | | | | | | | compiled with NSMALLPOSINTS = 0. | ||||
| * | Issue #27895: Spelling fixes (Contributed by Ville Skyttä). | Martin Panter | 2016-09-07 | 1 | -1/+1 |
| | | |||||
* | | Issue #26331: Implement the parsing part of PEP 515. | Brett Cannon | 2016-09-09 | 1 | -37/+132 |
| | | | | | | | | Thanks to Georg Brandl for the patch. | ||||
* | | replace PY_SIZE_MAX with SIZE_MAX | Benjamin Peterson | 2016-09-07 | 1 | -1/+1 |
| | | |||||
* | | replace Py_(u)intptr_t with the c99 standard types | Benjamin Peterson | 2016-09-06 | 1 | -2/+2 |
| | | |||||
* | | remove some silly defined() tests | Benjamin Peterson | 2016-09-06 | 1 | -2/+2 |
| | | |||||
* | | replace PY_LONG_LONG with long long | Benjamin Peterson | 2016-09-06 | 1 | -40/+40 |
| | | |||||
* | | require a long long data type (closes #27961) | Benjamin Peterson | 2016-09-06 | 1 | -20/+0 |
| | | |||||
* | | Issue #27895: Spelling fixes (Contributed by Ville Skyttä). | Raymond Hettinger | 2016-08-30 | 1 | -1/+1 |
| | | |||||
* | | Issue #27870: A left shift of zero by a large integer no longer attempts to ↵ | Mark Dickinson | 2016-08-29 | 1 | -0/+5 |
| | | | | | | | | allocate large amounts of memory. | ||||
* | | Issue #25402: in int-to-decimal-string conversion, reduce intermediate ↵ | Mark Dickinson | 2016-08-29 | 1 | -8/+11 |
| | | | | | | | | storage requirements and relax restriction on converting large integers. Patch by Serhiy Storchaka. | ||||
* | | Issue #27214: Fix potential bug and remove useless optimization in ↵ | Mark Dickinson | 2016-08-29 | 1 | -2/+4 |
| | | | | | | | | long_invert. Thanks Oren Milman. | ||||
* | | Issue #27792: force int return type for modulo operations involving bools. | Mark Dickinson | 2016-08-22 | 1 | -2/+5 |
| | | |||||
* | | Untabify Objects/longobject.c. | Mark Dickinson | 2016-08-21 | 1 | -2/+2 |
| | | |||||
* | | Issue #25604: Fix minor bug in integer true division, which could | Mark Dickinson | 2016-08-21 | 1 | -2/+2 |
| | | | | | | | | have caused off-by-one-ulp results on certain platforms. | ||||
* | | Issue #27786: Simplify x_sub() | Victor Stinner | 2016-08-17 | 1 | -3/+1 |
| | | | | | | | | | | The z variable is known to be a fresh number which cannot be shared, Py_SIZE() can be used directly to negate the number. | ||||
* | | Issue #27626: Merge spelling fixes from 3.5 | Martin Panter | 2016-07-28 | 1 | -2/+2 |
|\ \ | |/ | |||||
| * | Issue #27626: Spelling fixes in docs, comments and internal names | Martin Panter | 2016-07-28 | 1 | -2/+2 |
| | | | | | | | | Based on patch by Ville Skyttä. | ||||
* | | Issue #27073: Removed redundant checks in long_add and long_sub. | Serhiy Storchaka | 2016-06-03 | 1 | -2/+10 |
| | | | | | | | | Patch by Oren Milman. | ||||
* | | Issue #23640: int.from_bytes() no longer bypasses constructors for subclasses. | Serhiy Storchaka | 2016-05-12 | 1 | -21/+3 |
|\ \ | |/ | |||||
| * | Issue #23640: int.from_bytes() no longer bypasses constructors for subclasses. | Serhiy Storchaka | 2016-05-12 | 1 | -21/+3 |
| | | |||||
* | | longobject.c: fix compilation warning on Windows 64-bit | Victor Stinner | 2016-03-23 | 1 | -1/+1 |
| | | | | | | | | We know that Py_SIZE(b) is -1 or 1 an so fits into the sdigit type. | ||||
* | | Issues #26289 and #26315: Optimize floor/modulo div for single-digit longs | Yury Selivanov | 2016-02-11 | 1 | -0/+79 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Microbenchmarks show 2-2.5x improvement. Built-in 'divmod' function is now also ~10% faster. -m timeit -s "x=22331" "x//2;x//-3;x//4;x//5;x//-6;x//7;x//8;x//-99;x//100;" with patch: 0.321 without patch: 0.633 -m timeit -s "x=22331" "x%2;x%3;x%-4;x%5;x%6;x%-7;x%8;x%99;x%-100;" with patch: 0.224 without patch: 0.66 Big thanks to Serhiy Storchaka, Mark Dickinson and Victor Stinner for thorow code reviews and algorithms improvements. | ||||
* | | Issue #26288: Fix comment | Yury Selivanov | 2016-02-06 | 1 | -3/+3 |
| | | |||||
* | | Issue #26288: Optimize PyLong_AsDouble. | Yury Selivanov | 2016-02-06 | 1 | -0/+7 |
| | | |||||
* | | Issue #24731: Fixed crash on converting objects with special methods | Serhiy Storchaka | 2015-11-25 | 1 | -1/+1 |
|\ \ | |/ | | | | | | | __bytes__, __trunc__, and __float__ returning instances of subclasses of bytes, int, and float to subclasses of bytes, int, and float correspondingly. | ||||
| * | Issue #24731: Fixed crash on converting objects with special methods | Serhiy Storchaka | 2015-11-25 | 1 | -1/+1 |
| |\ | | | | | | | | | | | | | __bytes__, __trunc__, and __float__ returning instances of subclasses of bytes, int, and float to subclasses of bytes, int, and float correspondingly. | ||||
| | * | Issue #24731: Fixed crash on converting objects with special methods | Serhiy Storchaka | 2015-11-25 | 1 | -1/+1 |
| | | | | | | | | | | | | | | | __bytes__, __trunc__, and __float__ returning instances of subclasses of bytes, int, and float to subclasses of bytes, int, and float correspondingly. | ||||
* | | | Fix compiler warnings (uninitialized variables), false alarms in fact | Victor Stinner | 2015-10-14 | 1 | -4/+2 |
| | | | |||||
* | | | Fix long_format_binary() | Victor Stinner | 2015-10-14 | 1 | -1/+1 |
| | | | | | | | | | | | | Issue #25399: Fix long_format_binary(), allocate bytes for the bytes writer. | ||||
* | | | Issue #25349: Optimize bytes % int | Victor Stinner | 2015-10-09 | 1 | -27/+93 |
|/ / | | | | | | | | | | | | | | | Optimize bytes.__mod__(args) for integere formats: %d (%i, %u), %o, %x and %X. _PyBytesWriter is now used to format directly the integer into the writer buffer, instead of using a temporary bytes object. Formatting is between 30% and 50% faster on a microbenchmark. | ||||
* | | Issue #24999: In longobject.c, use two shifts instead of ">> 2*PyLong_SHIFT" to | Victor Stinner | 2015-09-19 | 1 | -4/+6 |
| | | | | | | | | | | | | avoid undefined behaviour when LONG_MAX type is smaller than 60 bits. This change should fix a warning with the ICC compiler. | ||||
* | | Issue #22486: Added the math.gcd() function. The fractions.gcd() function ↵ | Serhiy Storchaka | 2015-05-12 | 1 | -0/+205 |
| | | | | | | | | | | | | now is deprecated. Based on patch by Mark Dickinson. | ||||
* | | #16518: Bring error messages in harmony with docs ("bytes-like object") | R David Murray | 2014-10-05 | 1 | -3/+1 |
| | | | | | | | | | | | | | | | | | | | | Some time ago we changed the docs to consistently use the term 'bytes-like object' in all the contexts where bytes, bytearray, memoryview, etc are used. This patch (by Ezio Melotti) completes that work by changing the error messages that previously reported that certain types did "not support the buffer interface" to instead say that a bytes-like object is required. (The glossary entry for bytes-like object references the discussion of the buffer protocol in the docs.) | ||||
* | | Removed redundant casts to `char *`. | Serhiy Storchaka | 2014-09-28 | 1 | -1/+1 |
| | | | | | | | | Corresponding functions now accept `const char *` (issue #1772673). | ||||
* | | Issue #22156: Fix "comparison between signed and unsigned integers" compiler | Victor Stinner | 2014-08-15 | 1 | -2/+2 |
| | | | | | | | | | | | | | | warnings in the Objects/ subdirectory. PyType_FromSpecWithBases() and PyType_FromSpec() now reject explicitly negative slot identifiers. | ||||
* | | Issue #21490: Add new C macros: Py_ABS() and Py_STRINGIFY() | Victor Stinner | 2014-05-14 | 1 | -37/+36 |
| | | | | | | | | | | Keep _Py_STRINGIZE() in PC/pyconfig.h to not introduce a dependency between pyconfig.h and pymacros.h. | ||||
* | | Issue #21193: Make (e.g.,) pow(2, -3, 5) raise ValueError rather than ↵ | Mark Dickinson | 2014-04-11 | 1 | -1/+1 |
|/ | | | | TypeError. Patch by Josh Rosenberg. | ||||
* | merge 3.3 | Benjamin Peterson | 2014-03-15 | 1 | -1/+2 |
|\ | |||||
| * | fix c89 declaration order | Benjamin Peterson | 2014-03-15 | 1 | -1/+2 |
| | | |||||
* | | merge 3.3 | Benjamin Peterson | 2014-03-15 | 1 | -1/+2 |
|\ \ | |/ | |||||
| * | don't do pointer arithmetic with signed numbers | Benjamin Peterson | 2014-03-15 | 1 | -1/+2 |
| | | |||||
| * | Issue #17576: Removed deprecation warnings added in changeset 618cca51a27e. | Serhiy Storchaka | 2013-12-14 | 1 | -9/+0 |
| | | |||||
* | | Issue #17576: Deprecation warning emitted now when __int__() or __index__() | Serhiy Storchaka | 2013-12-11 | 1 | -104/+111 |
|\ \ | |/ | | | | | | | return not int instance. Introduced _PyLong_FromNbInt() and refactored PyLong_As*() functions. |