Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Make PyXXX_Fini() functions private (GH-15531) | Victor Stinner | 2019-08-26 | 1 | -1/+1 |
| | | | | | For example, rename PyTuple_Fini() to _PyTuple_Fini(). These functions are only declared in the internal C API. | ||||
* | bpo-37483: add _PyObject_CallOneArg() function (#14558) | Jeroen Demeyer | 2019-07-04 | 1 | -1/+1 |
| | |||||
* | bpo-20092. Use __index__ in constructors of int, float and complex. (GH-13108) | Serhiy Storchaka | 2019-06-01 | 1 | -0/+9 |
| | |||||
* | bpo-36974: tp_print -> tp_vectorcall_offset and tp_reserved -> tp_as_async ↵ | Jeroen Demeyer | 2019-05-31 | 1 | -2/+2 |
| | | | | | | | | | (GH-13464) Automatically replace tp_print -> tp_vectorcall_offset tp_compare -> tp_as_async tp_reserved -> tp_as_async | ||||
* | bpo-36957: Add _PyLong_Rshift() and _PyLong_Lshift(). (GH-13416) | Serhiy Storchaka | 2019-05-19 | 1 | -2/+2 |
| | |||||
* | bpo-36793: Remove unneeded __str__ definitions. (GH-13081) | Serhiy Storchaka | 2019-05-06 | 1 | -1/+1 |
| | | | | Classes that define __str__ the same as __repr__ can just inherit it from object. | ||||
* | bpo-35713: Split _Py_InitializeCore into subfunctions (GH-11650) | Victor Stinner | 2019-01-22 | 1 | -1/+2 |
| | | | | | | | | | | | | | | * Split _Py_InitializeCore_impl() into subfunctions: add multiple pycore_init_xxx() functions * Preliminary sys.stderr is now set earlier to get an usable sys.stderr ealier. * Move code into _Py_Initialize_ReconfigureCore() to be able to call it from _Py_InitializeCore(). * Split _PyExc_Init(): create a new _PyBuiltins_AddExceptions() function. * Call _PyExc_Init() earlier in _Py_InitializeCore_impl() and new_interpreter() to get working exceptions earlier. * _Py_ReadyTypes() now returns _PyInitError rather than calling Py_FatalError(). * Misc code cleanup | ||||
* | bpo-35059: PyObject_INIT() casts to PyObject* (GH-10674) | Victor Stinner | 2018-11-23 | 1 | -1/+1 |
| | | | | | | PyObject_INIT() and PyObject_INIT_VAR() now cast their first argument to PyObject*, as done in Python 3.7. Revert partially commit b4435e20a92af474f117b78b98ddc6f515363af5. | ||||
* | bpo-35059: Convert PyObject_INIT() to function (GH-10077) | Victor Stinner | 2018-10-26 | 1 | -1/+1 |
| | | | | | * Convert PyObject_INIT() and PyObject_INIT_VAR() macros to static inline functions. * Fix usage of these functions: cast to PyObject* or PyVarObject*. | ||||
* | Fix typo and edit for clarity in the docstrings of sys.float_info. (GH-2251) | Stefano Taschini | 2018-03-26 | 1 | -3/+2 |
| | |||||
* | bpo-31979: Simplify transforming decimals to ASCII (#4336) | Serhiy Storchaka | 2017-11-13 | 1 | -4/+3 |
| | | | | | in int(), float() and complex() parsers. This also speeds up parsing non-ASCII numbers by around 20%. | ||||
* | bpo-31373: remove overly strict float range checks (#3486) | Benjamin Peterson | 2017-09-11 | 1 | -2/+2 |
| | | | | | This undoes a853a8ba7850381d49b284295dd6f0dc491dbe44 except for the pytime.c parts. We want to continue to allow IEEE 754 doubles larger than FLT_MAX to be rounded into finite floats. Tests were added to very this behavior. | ||||
* | bpo-31373: fix undefined floating-point demotions (#3396) | Benjamin Peterson | 2017-09-07 | 1 | -4/+6 |
| | |||||
* | 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 |
| | |