Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Update Argument Clinic generated code for bpo-29878. (#1001) | Serhiy Storchaka | 2017-04-05 | 1 | -1/+1 |
| | |||||
* | bpo-29878: Add global instances of int for 0 and 1. (#852) | Serhiy Storchaka | 2017-03-30 | 1 | -10/+4 |
| | |||||
* | bpo-29793: Convert some builtin types constructors to Argument Clinic. (#615) | Serhiy Storchaka | 2017-03-19 | 1 | -17/+16 |
| | |||||
* | bpo-20185: Convert float object implementation to Argument Clinic. (#543) | Serhiy Storchaka | 2017-03-11 | 1 | -156/+213 |
| | | | Based on patch by Vajrasky Kok. | ||||
* | bpo-29695: Remove bad keyword parameters in int(), bool(), float(), list() ↵ | Serhiy Storchaka | 2017-03-06 | 1 | -8/+3 |
| | | | | and tuple(). (#518) | ||||
* | bpo-29695: Deprecated using bad named keyword arguments in builtings: (#486) | Serhiy Storchaka | 2017-03-05 | 1 | -0/+6 |
| | | | | int(), bool(), float(), list() and tuple(). Specify the value as a positional argument instead. | ||||
* | Backed out changeset b9c9691c72c5 | Victor Stinner | 2016-12-04 | 1 | -1/+1 |
| | | | | | | Issue #28858: The change b9c9691c72c5 introduced a regression. It seems like _PyObject_CallArg1() uses more stack memory than PyObject_CallFunctionObjArgs(). | ||||
* | Replace PyObject_CallFunctionObjArgs() with fastcall | Victor Stinner | 2016-12-01 | 1 | -1/+1 |
| | | | | | | | | | | | | | | * PyObject_CallFunctionObjArgs(func, NULL) => _PyObject_CallNoArg(func) * PyObject_CallFunctionObjArgs(func, arg, NULL) => _PyObject_CallArg1(func, arg) PyObject_CallFunctionObjArgs() allocates 40 bytes on the C stack and requires extra work to "parse" C arguments to build a C array of PyObject*. _PyObject_CallNoArg() and _PyObject_CallArg1() are simpler and don't allocate memory on the C stack. This change is part of the fastcall project. The change on listsort() is related to the issue #23507. | ||||
* | Added the const qualifier to char* variables that refer to readonly internal | Serhiy Storchaka | 2016-11-20 | 1 | -3/+3 |
| | | | | UTF-8 represenatation of Unicode objects. | ||||
* | Replaced outdated macros _PyUnicode_AsString and _PyUnicode_AsStringAndSize | Serhiy Storchaka | 2016-11-20 | 1 | -2/+2 |
| | | | | with PyUnicode_AsUTF8 and PyUnicode_AsUTF8AndSize. | ||||
* | Issue #26331: Implement the parsing part of PEP 515. | Brett Cannon | 2016-09-09 | 1 | -23/+36 |
| | | | | Thanks to Georg Brandl for the patch. | ||||
* | Issue #11734: Add support for IEEE 754 half-precision floats to the struct ↵ | Mark Dickinson | 2016-09-03 | 1 | -1/+183 |
| | | | | module. Original patch by Eli Stevens. | ||||
* | Issue #26983: float() now always return an instance of exact float. | Serhiy Storchaka | 2016-06-03 | 1 | -16/+30 |
| | | | | | | The deprecation warning is emitted if __float__ returns an instance of a strict subclass of float. In a future versions of Python this can be an error. | ||||
* | Issue #27005: Fixed the call of PyObject_CallFunctionObjArgs(). | Serhiy Storchaka | 2016-05-12 | 1 | -1/+1 |
| | |||||
* | Issue #27005: Optimized the float.fromhex() class method for exact float. | Serhiy Storchaka | 2016-05-12 | 1 | -6/+5 |
| | |||||
* | Issue #26200: Restored more safe usages of Py_SETREF. | Serhiy Storchaka | 2016-04-11 | 1 | -2/+2 |
|\ | |||||
* \ | Issue #22570: Renamed Py_SETREF to Py_XSETREF. | Serhiy Storchaka | 2016-04-06 | 1 | -2/+2 |
|\ \ | |/ | |||||
* | | Clean up float.as_integer_ratio(). | Serhiy Storchaka | 2015-12-29 | 1 | -20/+16 |
| | | |||||
* | | Issue #25971: Optimized creating Fractions from floats by 2 times and from | Serhiy Storchaka | 2015-12-29 | 1 | -6/+6 |
|/ | | | | | | Decimals by 3 times. Unified error messages in float.as_integer_ratio(), Decimal.as_integer_ratio(), and Fraction constructors. | ||||
* | 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 #24802: Merge null termination fixes from 3.4 into 3.5 | Martin Panter | 2015-11-07 | 1 | -0/+15 |
|\ \ | |/ | |||||
| * | Issue #24802: Copy bytes-like objects to null-terminated buffers if necessary | Martin Panter | 2015-11-07 | 1 | -0/+15 |
| | | | | | | | | | | | | | | | | This avoids possible buffer overreads when int(), float(), compile(), exec() and eval() are passed bytes-like objects. Similar code is removed from the complex() constructor, where it was not reachable. Patch by John Leitch, Serhiy Storchaka and Martin Panter. | ||||
* | | Issue 19933: Provide default argument for ndigits in round. Patch by ↵ | Steve Dower | 2015-04-15 | 1 | -2/+3 |
| | | | | | | | | Vajrasky Kok. | ||||
* | | merge 3.4 (#23590) | Benjamin Peterson | 2015-03-06 | 1 | -0/+1 |
|\ \ | |/ | |||||
| * | fix potential refleak in PyFloat_AsDouble (closes #23590) | Benjamin Peterson | 2015-03-06 | 1 | -0/+1 |
| | | |||||
* | | Issue #22896: Avoid to use PyObject_AsCharBuffer(), PyObject_AsReadBuffer() | Serhiy Storchaka | 2015-02-02 | 1 | -1/+7 |
|\ \ | |/ | | | | | and PyObject_AsWriteBuffer(). | ||||
| * | Issue #22896: Avoid to use PyObject_AsCharBuffer(), PyObject_AsReadBuffer() | Serhiy Storchaka | 2015-02-02 | 1 | -1/+7 |
| | | | | | | | | and PyObject_AsWriteBuffer(). | ||||
* | | Removed redundant casts to `char *`. | Serhiy Storchaka | 2014-09-28 | 1 | -2/+2 |
|/ | | | | Corresponding functions now accept `const char *` (issue #1772673). | ||||
* | Silence expression result unused warnings with clang. | Christian Heimes | 2013-12-04 | 1 | -1/+1 |
| | | | | | | | | | | | | The PyObject_INIT() macros returns obj: ../cpython/Objects/methodobject.c:32:23: warning: expression result unused [-Wunused-value] PyObject_INIT(op, &PyCFunction_Type); ^~ ../cpython/Include/objimpl.h:139:69: note: expanded from macro 'PyObject_INIT' ( Py_TYPE(op) = (typeobj), _Py_NewReference((PyObject *)(op)), (op) ) ^ 1 warning generated. | ||||
* | Issue #3158: doctest can now find doctests in functions and methods | Zachary Ware | 2013-11-24 | 1 | -1/+1 |
| | | | | | | | | written in C. As a part of this, a few doctests have been added to the builtins module (on hex(), oct(), and bin()), a doctest has been fixed (hopefully on all platforms) on float, and test_builtins now runs doctests in builtins. | ||||
* | #17080: improve error message of float/complex when the wrong type is passed. | Ezio Melotti | 2013-11-07 | 1 | -2/+3 |
| | |||||
* | #19069: merge with 3.3. | Ezio Melotti | 2013-10-05 | 1 | -11/+11 |
|\ | |||||
| * | #19069: use imperative mood in float object docstrings. Patch by Marco Buttu. | Ezio Melotti | 2013-10-05 | 1 | -11/+11 |
| | | |||||
* | | Issue #18783: Removed existing mentions of Python long type in docstrings, | Serhiy Storchaka | 2013-08-27 | 1 | -4/+4 |
|\ \ | |/ | | | | | error messages and comments. | ||||
| * | Issue #18783: Removed existing mentions of Python long type in docstrings, | Serhiy Storchaka | 2013-08-27 | 1 | -4/+4 |
| | | | | | | | | error messages and comments. | ||||
* | | Issue #18722: Remove uses of the "register" keyword in C code. | Antoine Pitrou | 2013-08-13 | 1 | -2/+2 |
| | | |||||
* | | Issue #18520: Add a new PyStructSequence_InitType2() function, same than | Victor Stinner | 2013-07-22 | 1 | -3/+6 |
| | | | | | | | | | | | | | | | | PyStructSequence_InitType() except that it has a return value (0 on success, -1 on error). * PyStructSequence_InitType2() now raises MemoryError on memory allocation failure * Fix also some calls to PyDict_SetItemString(): handle error | ||||
* | | Reuse Py_MIN and Py_MAX macros: remove duplicate MIN/MAX macros | Victor Stinner | 2013-06-04 | 1 | -9/+4 |
| | | | | | | | | multiprocessing.h: remove unused MIN and MAX macros | ||||
* | | Close #17694: Add minimum length to _PyUnicodeWriter | Victor Stinner | 2013-04-17 | 1 | -1/+1 |
|/ | | | | | | | | | | | | * Add also min_char attribute to _PyUnicodeWriter structure (currently unused) * _PyUnicodeWriter_Init() has no more argument (except the writer itself): min_length and overallocate must be set explicitly * In error handlers, only enable overallocation if the replacement string is longer than 1 character * CJK decoders don't use overallocation anymore * Set min_length, instead of preallocating memory using _PyUnicodeWriter_Prepare(), in many decoders * _PyUnicode_DecodeUnicodeInternal() checks for integer overflow | ||||
* | Fix a few typos and a double semicolon. Patch by Eitan Adler. | Ezio Melotti | 2013-01-27 | 1 | -1/+1 |
| | |||||
* | Issue #14785: Add sys._debugmallocstats() to help debug low-level memory ↵ | David Malcolm | 2012-06-22 | 1 | -0/+10 |
| | | | | allocation issues | ||||
* | Issue #14744: Use the new _PyUnicodeWriter internal API to speed up str%args ↵ | Victor Stinner | 2012-05-29 | 1 | -7/+20 |
| | | | | | | | | | | | | | | | | | and str.format(args) * Formatting string, int, float and complex use the _PyUnicodeWriter API. It avoids a temporary buffer in most cases. * Add _PyUnicodeWriter_WriteStr() to restore the PyAccu optimization: just keep a reference to the string if the output is only composed of one string * Disable overallocation when formatting the last argument of str%args and str.format(args) * Overallocation allocates at least 100 characters: add min_length attribute to the _PyUnicodeWriter structure * Add new private functions: _PyUnicode_FastCopyCharacters(), _PyUnicode_FastFill() and _PyUnicode_FromASCII() The speed up is around 20% in average. | ||||
* | Issue #14435: Remove special block allocation code from floatobject.c | Kristján Valur Jónsson | 2012-03-30 | 1 | -131/+27 |
| | | | | | | PyFloatObjects are now allocated using PyObject_MALLOC like all other internal types, but maintain a limited freelist of objects at hand for performance. This will result in more consistent memory usage by Python. | ||||
* | Merge 3.2 -> default (issue 13889) | Mark Dickinson | 2012-01-27 | 1 | -0/+5 |
|\ | |||||
| * | Issue #13889: Add missing _Py_SET_53BIT_PRECISION_* calls around uses of ↵ | Mark Dickinson | 2012-01-27 | 1 | -0/+5 |
| | | | | | | | | dtoa.c functions in float round. | ||||
* | | Issue #13088: Add shared Py_hexdigits constant to format a number into base 16 | Victor Stinner | 2011-10-14 | 1 | -1/+1 |
| | | |||||
* | | Implement PEP 393. | Martin v. Löwis | 2011-09-28 | 1 | -15/+4 |
| | | |||||
* | | Replace Py_NotImplemented returns with the macro form Py_RETURN_NOTIMPLEMENTED. | Brian Curtin | 2011-08-11 | 1 | -2/+1 |
| | | | | | | | | The macro was introduced in #12724. | ||||
* | | Issue #11495: OSF support is eliminated. It was deprecated in Python 3.2 | Jesus Cea | 2011-03-14 | 1 | -5/+0 |
| | |