summaryrefslogtreecommitdiffstats
path: root/Python/bltinmodule.c
Commit message (Collapse)AuthorAgeFilesLines
* bpo-24037: Add Argument Clinic converter `bool(accept={int})`. (#485)Serhiy Storchaka2017-03-121-2/+2
|
* bpo-29556: Remove unused #include <langinfo.h> (#98)Yen Chi Hsuan2017-02-151-4/+0
| | | | | | bltinmodule.c: Added in b744ba1 and no longer necessary since d64e8a7 posixmodule.c: Added in d1cd4d4 and no longer necessary since efb00c0 pythonrun.c: Added in 73d538b and no longer necessary since d600951 sysmodule.c: Added in 5467d4c and no longer necessary since a2c17c5
* Issue #26729: Fixed __text_signature__ for sorted().Serhiy Storchaka2017-01-231-1/+1
|\ | | | | | | Patch by Erik Welch.
| * Issue #26729: Fixed __text_signature__ for sorted().Serhiy Storchaka2017-01-231-1/+1
| |\ | | | | | | | | | Patch by Erik Welch.
| | * Issue #26729: Fixed __text_signature__ for sorted().Serhiy Storchaka2017-01-231-1/+1
| | | | | | | | | | | | Patch by Erik Welch.
* | | Issue #28999: Use Py_RETURN_NONE, Py_RETURN_TRUE and Py_RETURN_FALSE whereverSerhiy Storchaka2017-01-231-4/+2
| | | | | | | | | | | | possible. Patch is writen with Coccinelle.
* | | Issue #29331: Simplified argument parsing in sorted() and list.sort().Serhiy Storchaka2017-01-211-9/+5
| | |
* | | Issue #29327: Fixed a crash when pass the iterable keyword argument to sorted().Serhiy Storchaka2017-01-201-1/+2
|\ \ \ | |/ /
| * | Issue #29327: Fixed a crash when pass the iterable keyword argument to sorted().Serhiy Storchaka2017-01-201-1/+2
| | |
* | | Issue #29296: convert print() to METH_FASTCALLINADA Naoki2017-01-191-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Replace PyArg_ParseTupleAndKeywords() with _PyArg_ParseStackAndKeywords() which is more efficient to parse keywords, since it decodes only keywords (char*) from UTF-8 once, instead of decoding at each call. * METH_FASTCALL avoids the creation of a temporary tuple to pass positional arguments. Patch written by INADA Naoki, pushed by Victor Stinner.
* | | sorted() uses METH_FASTCALLVictor Stinner2017-01-171-11/+9
| | |
* | | next() uses FASTCALLVictor Stinner2017-01-171-3/+9
| | |
* | | getattr() uses METH_FASTCALLVictor Stinner2017-01-171-3/+8
| | |
* | | __build_class__() builtin uses METH_FASTCALLVictor Stinner2017-01-161-15/+9
| | |
* | | Add _PY_FASTCALL_SMALL_STACK constantVictor Stinner2016-12-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Issue #28870: Add a new _PY_FASTCALL_SMALL_STACK constant, size of "small stacks" allocated on the C stack to pass positional arguments to _PyObject_FastCall(). _PyObject_Call_Prepend() now uses a small stack of 5 arguments (40 bytes) instead of 8 (64 bytes), since it is modified to use _PY_FASTCALL_SMALL_STACK.
* | | Use _PyObject_CallNoArg()Victor Stinner2016-12-061-1/+1
| | | | | | | | | | | | | | | | | | | | | Replace: PyObject_CallFunctionObjArgs(callable, NULL) with: _PyObject_CallNoArg(callable)
* | | Merge #23722 from 3.6Nick Coghlan2016-12-051-5/+35
|\ \ \ | |/ /
| * | Issue #23722: improve __classcell__ compatibilityNick Coghlan2016-12-051-5/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Handling zero-argument super() in __init_subclass__ and __set_name__ involved moving __class__ initialisation to type.__new__. This requires cooperation from custom metaclasses to ensure that the new __classcell__ entry is passed along appropriately. The initial implementation of that change resulted in abruptly broken zero-argument super() support in metaclasses that didn't adhere to the new requirements (such as Django's metaclass for Model definitions). The updated approach adopted here instead emits a deprecation warning for those cases, and makes them work the same way they did in Python 3.5. This patch also improves the related class machinery documentation to cover these details and to include more reader-friendly cross-references and index entries.
* | | Backed out changeset b9c9691c72c5Victor Stinner2016-12-041-4/+4
| | | | | | | | | | | | | | | | | | Issue #28858: The change b9c9691c72c5 introduced a regression. It seems like _PyObject_CallArg1() uses more stack memory than PyObject_CallFunctionObjArgs().
* | | Replace PyObject_CallFunctionObjArgs() with fastcallVictor Stinner2016-12-011-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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 internalSerhiy Storchaka2016-11-201-2/+2
|/ / | | | | | | UTF-8 represenatation of Unicode objects.
* | Replaced outdated macros _PyUnicode_AsString and _PyUnicode_AsStringAndSizeSerhiy Storchaka2016-11-201-4/+4
| | | | | | | | with PyUnicode_AsUTF8 and PyUnicode_AsUTF8AndSize.
* | Issue #23722: Initialize __class__ from type.__new__()Nick Coghlan2016-09-111-6/+4
| | | | | | | | | | | | | | | | | | The __class__ cell used by zero-argument super() is now initialized from type.__new__ rather than __build_class__, so class methods relying on that will now work correctly when called from metaclass methods during class creation. Patch by Martin Teichmann.
* | Issue #24254: Drop cls.__definition_order__.Eric Snow2016-09-081-1/+1
| |
* | Issue #27781: Change file system encoding on Windows to UTF-8 (PEP 529)Steve Dower2016-09-081-3/+5
| |
* | Avoid calling functions with an empty string as format stringVictor Stinner2016-09-061-6/+6
| | | | | | | | Directly pass NULL rather than an empty string.
* | Issue #24254: Preserve class attribute definition order.Eric Snow2016-09-051-1/+1
| |
* | MergeRaymond Hettinger2016-09-031-1/+1
|\ \ | |/
| * Issue 27936: Fix inconsistent round() behavior between float and intRaymond Hettinger2016-09-031-1/+1
| |
* | MergeRaymond Hettinger2016-08-261-2/+2
|\ \ | |/
| * Issue 19504: Change "customise" to "customize" American spelling.Raymond Hettinger2016-08-261-2/+2
| |
* | Use Py_ssize_t type for number of argumentsVictor Stinner2016-08-241-1/+1
| | | | | | | | | | Issue #27848: use Py_ssize_t rather than C int for the number of function positional and keyword arguments.
* | Issue #27809: map_next() uses fast callVictor Stinner2016-08-231-15/+31
| | | | | | | | | | Use a small stack allocated in the C stack for up to 5 iterator functions, otherwise allocates a stack on the heap memory.
* | Backed out changeset 70f88b097f60 (map_next)Victor Stinner2016-08-231-31/+15
| |
* | Issue #27809: map_next() uses fast callVictor Stinner2016-08-231-15/+31
| | | | | | | | | | Use a small stack allocated in the C stack for up to 5 iterator functions, otherwise allocates a stack on the heap memory.
* | Issue #27809: builtin___build_class__() uses fast callVictor Stinner2016-08-221-6/+2
| |
* | Issue #27809: Use _PyObject_FastCallDict()Victor Stinner2016-08-221-10/+2
| | | | | | | | | | | | | | | | | | Modify: * init_subclass() * builtin___build_class__() Fix also a bug in init_subclass(): check for super() failure.
* | Issue #27809: Use _PyObject_FastCallDict()Victor Stinner2016-08-221-10/+5
| | | | | | | | | | | | | | | | | | Modify: * builtin_sorted() * classmethoddescr_call() * methoddescr_call() * wrapperdescr_call()
* | - Issue #27332: Fixed the type of the first argument of module-level functionsSerhiy Storchaka2016-07-071-59/+58
|\ \ | |/ | | | | generated by Argument Clinic. Patch by Petr Viktorin.
| * Issue #27332: Fixed the type of the first argument of module-level functionsSerhiy Storchaka2016-07-071-59/+58
| | | | | | | | generated by Argument Clinic. Patch by Petr Viktorin.
* | Issue #27342: Replaced some Py_XDECREFs with Py_DECREFs.Serhiy Storchaka2016-06-181-2/+2
| | | | | | | | Patch by Xiang Zhang.
* | Restored parameter name "self" since gdb needs exact specific parameter names.Serhiy Storchaka2016-05-051-2/+3
| |
* | Got rid of redundand "self" parameter declarations.Serhiy Storchaka2016-05-021-3/+2
| | | | | | | | Argument Clinic is now able to infer all needed information.
* | Regenerate Argument Clinic code for issue #26874.Serhiy Storchaka2016-05-011-1/+1
|\ \ | |/
| * Regenerate Argument Clinic code for issue #26874.Serhiy Storchaka2016-05-011-1/+1
| |
* | Closes #26874: Merge with 3.5Zachary Ware2016-04-281-1/+1
|\ \ | |/
| * Issue #26874: Simplify the divmod docstringZachary Ware2016-04-281-1/+1
| |
* | Closes #26874: Merge with 3.5Zachary Ware2016-04-281-1/+1
|\ \ | |/
| * Issue #26874: Fix divmod docstringZachary Ware2016-04-281-1/+1
| |
* | Issue #26057: Got rid of nonneeded use of PyUnicode_FromObject().Serhiy Storchaka2016-04-131-3/+2
| |