summaryrefslogtreecommitdiffstats
path: root/Include
Commit message (Collapse)AuthorAgeFilesLines
* bpo-29867: Add asserts in PyTuple_GET_SIZE, PyList_GET_SIZE and ↵Serhiy Storchaka2017-04-213-3/+3
| | | | PySet_GET_SIZE. (#751)
* remove configure test for inline keyword (#1231)Benjamin Peterson2017-04-211-4/+1
| | | We require C99, so a configure test for this standard feature is not needed.
* bpo-30022: Get rid of using EnvironmentError and IOError (except test… (#1051)Serhiy Storchaka2017-04-161-2/+2
|
* bpo-29941: Assert fixes (#886)T. Wouters2017-03-311-0/+4
| | | | | | | | Make a non-Py_DEBUG, asserts-enabled build of CPython possible. This means making sure helper functions are defined when NDEBUG is not defined, not just when Py_DEBUG is defined. Also fix a division-by-zero in obmalloc.c that went unnoticed because in Py_DEBUG mode, elsize is never zero.
* bpo-29935: Fixed error messages in the index() method of tuple, list and ↵Serhiy Storchaka2017-03-301-1/+1
| | | | | deque (#887) when pass indices of wrong type.
* bpo-29852: Argument Clinic Py_ssize_t converter now supports None (#716)Serhiy Storchaka2017-03-301-0/+3
| | | if pass `accept={int, NoneType}`.
* bpo-29878: Add global instances of int for 0 and 1. (#852)Serhiy Storchaka2017-03-301-0/+5
|
* bpo-29936: fix typo __GNU*C*_MINOR__ (#878)Niklas Fiekas2017-03-291-1/+1
|
* bpo-6532: Make the thread id an unsigned integer. (#781)Serhiy Storchaka2017-03-232-4/+8
| | | | | | | | | | | * bpo-6532: Make the thread id an unsigned integer. From C API side the type of results of PyThread_start_new_thread() and PyThread_get_thread_ident(), the id parameter of PyThreadState_SetAsyncExc(), and the thread_id field of PyThreadState changed from "long" to "unsigned long". * Restore a check in thread_get_ident().
* bpo-29748: Added the slice index converter in Argument Clinic. (#549)Serhiy Storchaka2017-03-191-0/+1
|
* bpo-28749: Fixed the documentation of the mapping codec APIs. (#487)Serhiy Storchaka2017-03-191-27/+18
| | | Added the documentation for PyUnicode_Translate().
* bpo-29735: Optimize partial_call(): avoid tuple (#516)Victor Stinner2017-03-141-0/+4
| | | | | | | | * Add _PyObject_HasFastCall() * partial_call() now avoids temporary tuple to pass positional arguments if the callable supports the FASTCALL calling convention for positional arguments. * Fix also a performance regression in partial_call() if the callable doesn't support FASTCALL.
* bpo-29548: Recommend PyObject_Call APIs over PyEval_Call APIs. (GH-75)INADA Naoki2017-03-141-0/+6
| | | | | | | | | | | | PyEval_Call* APIs are not documented and they doesn't respect PY_SSIZE_T_CLEAN. So add comment block which recommends PyObject_Call* APIs to ceval.h. This commit also changes PyEval_CallMethod and PyEval_CallFunction implementation same to PyObject_CallMethod and PyObject_CallFunction to reduce future maintenance cost. Optimization to avoid temporary tuple are copied too. PyEval_CallFunction(callable, "i", (int)i) now calls callable(i) instead of raising TypeError. But accepting this edge case is backward compatible.
* bpo-28667: Fix a compile warning on FreeBSD when compare with FD_SETSIZE. (#501)Serhiy Storchaka2017-03-121-1/+1
| | | FreeBSD is the only platforms with unsigned FD_SETSIZE.
* bpo-15695: Add PyAPI_FUNC() to _PyDict_SizeOf() declaration. (#639)Serhiy Storchaka2017-03-121-1/+1
|
* bpo-29619: Convert st_ino using unsigned integer (#557)Victor Stinner2017-03-091-1/+1
| | | | bpo-29619: os.stat() and os.DirEntry.inodeo() now convert inode (st_ino) using unsigned integers.
* Fix the only non-C90 comment to be C90 compatible. (#566)n.d. parker2017-03-081-1/+1
|
* bpo-27593: Get SCM build info from git instead of hg. (#446)Ned Deily2017-03-041-2/+2
| | | | | | | sys.version and the platform module python_build(), python_branch(), and python_revision() functions now use git information rather than hg when building from a repo. Based on original patches by Brett Cannon and Steve Dower.
* Fixed a typo in the comment in Include/pyport.h (#425)Joseph Shen2017-03-031-1/+1
| | | #ifdef HAVE_DECLSPEC_DLL / #endif mismatch
* bpo-29463: Add docstring field to some AST nodes. (#46)INADA Naoki2017-02-221-10/+15
| | | | | | | | | | | * bpo-29463: Add docstring field to some AST nodes. ClassDef, ModuleDef, FunctionDef, and AsyncFunctionDef has docstring field for now. It was first statement of there body. * fix document. thanks travis! * doc fixes
* bpo-29524: Add Objects/call.c file (#12)Victor Stinner2017-02-121-6/+16
| | | | | | | | | * Move all functions to call objects in a new Objects/call.c file. * Rename fast_function() to _PyFunction_FastCallKeywords(). * Copy null_error() from Objects/abstract.c * Inline type_error() in call.c to not have to copy it, it was only called once. * Export _PyEval_EvalCodeWithName() since it is now called from call.c.
* Backed out changeset f23fa1f7b68fVictor Stinner2017-02-101-16/+6
| | | | | Sorry, I didn't want to push this change before the review :-( I was pushing a change into the 2.7 branch.
* Issue #29465: Add Objects/call.c fileVictor Stinner2017-02-101-6/+16
| | | | | | | | | | * Move all functions to call objects in a new Objects/call.c file. * Rename fast_function() to _PyFunction_FastCallKeywords(). * Copy null_error() from Objects/abstract.c * Inline type_error() in call.c to not have to copy it, it was only called once. * Export _PyEval_EvalCodeWithName() since it is now called from call.c.
* Optimize slots: avoid temporary PyMethodObjectVictor Stinner2017-02-091-0/+6
| | | | | | | | | | | | | | | | | | Issue #29507: Optimize slots calling Python methods. For Python methods, get the unbound Python function and prepend arguments with self, rather than calling the descriptor which creates a temporary PyMethodObject. Add a new _PyObject_FastCall_Prepend() function used to call the unbound Python method with self. It avoids the creation of a temporary tuple to pass positional arguments. Avoiding temporary PyMethodObject and avoiding temporary tuple makes Python slots up to 1.46x faster. Microbenchmark on a __getitem__() method implemented in Python: Median +- std dev: 121 ns +- 5 ns -> 82.8 ns +- 1.0 ns: 1.46x faster (-31%) Co-Authored-by: INADA Naoki <songofacandy@gmail.com>
* Issue #29460: _PyArg_NoKeywords(), _PyArg_NoStackKeywords() andSerhiy Storchaka2017-02-061-0/+7
| | | | _PyArg_NoPositional() now are macros.
* Issue #27867: Silenced may-be-used-uninitialized warnings afterSerhiy Storchaka2017-02-041-2/+3
|\ | | | | | | using PySlice_GetIndicesEx() in debug builds.
| * Issue #27867: Silenced may-be-used-uninitialized warnings afterSerhiy Storchaka2017-02-041-2/+3
| |\ | | | | | | | | | using PySlice_GetIndicesEx() in debug builds.
| | * Issue #27867: Silenced may-be-used-uninitialized warnings afterSerhiy Storchaka2017-02-041-2/+3
| | | | | | | | | | | | using PySlice_GetIndicesEx() in debug builds.
* | | Issue #29263: LOAD_METHOD support for C methodsINADA Naoki2017-02-022-0/+10
| | | | | | | | | | | | Calling builtin method is at most 10% faster.
* | | Issue #27867: Function PySlice_GetIndicesEx() is deprecated and replaced withSerhiy Storchaka2017-01-251-2/+14
|\ \ \ | |/ / | | | | | | | | | | | | a macro if Py_LIMITED_API is not set or set to the value between 0x03050400 and 0x03060000 (not including) or 0x03060100 or higher. Added functions PySlice_Unpack() and PySlice_AdjustIndices().
| * | Issue #27867: Function PySlice_GetIndicesEx() is replaced with a macro ifSerhiy Storchaka2017-01-251-2/+14
| |\ \ | | |/ | | | | | | | | | Py_LIMITED_API is not set or set to the value between 0x03050400 and 0x03060000 (not including) or 0x03060100 or higher.
| | * Issue #27867: Function PySlice_GetIndicesEx() is replaced with a macro ifSerhiy Storchaka2017-01-251-2/+14
| | | | | | | | | | | | | | | Py_LIMITED_API is not set or set to the value between 0x03050400 and 0x03060000 (not including) or 0x03060100 or higher.
* | | Issue #29083: Fixed the declaration of some public API functions.Serhiy Storchaka2017-01-241-7/+5
|\ \ \ | |/ / | | | | | | | | | | | | | | | PyArg_VaParse() and PyArg_VaParseTupleAndKeywords() were not available in limited API. PyArg_ValidateKeywordArguments(), PyArg_UnpackTuple() and Py_BuildValue() were not available in limited API of version < 3.3 when PY_SSIZE_T_CLEAN is defined.
| * | Issue #29083: Fixed the declaration of some public API functions.Serhiy Storchaka2017-01-241-7/+5
| |\ \ | | |/ | | | | | | | | | | | | | | | PyArg_VaParse() and PyArg_VaParseTupleAndKeywords() were not available in limited API. PyArg_ValidateKeywordArguments(), PyArg_UnpackTuple() and Py_BuildValue() were not available in limited API of version < 3.3 when PY_SSIZE_T_CLEAN is defined.
| | * Issue #29083: Fixed the declaration of some public API functions.Serhiy Storchaka2017-01-241-5/+5
| | | | | | | | | | | | | | | | | | | | | PyArg_VaParse() and PyArg_VaParseTupleAndKeywords() were not available in limited API. PyArg_ValidateKeywordArguments(), PyArg_UnpackTuple() and Py_BuildValue() were not available in limited API of version < 3.3 when PY_SSIZE_T_CLEAN is defined.
| | * Fix incorrect patchlevel information for 3.5.3+.Larry Hastings2017-01-201-2/+2
| | | | | | | | | | | | | | | | | | | | | It got messed up when I merged my private 3.5.3 release changes with new work happening in the 3.5 main branch. (3.5 main branch was in "3.5.3rc1", my branch was "3.5.3+", and Mercurial helpfully merged the two in a kind of nonsense way.)
| | * Merge 3.5.3 release head with main 3.5 branch.Larry Hastings2017-01-172-2/+3
| | |\
| | * | Post-release updates for 3.5.3.Larry Hastings2017-01-171-1/+1
| | | |
| | * | Version bump for Python 3.5.3.v3.5.3Larry Hastings2017-01-161-3/+3
| | | |
* | | | Issue #29360: _PyStack_AsDict() doesn't check kwnamesVictor Stinner2017-01-241-6/+9
| | | | | | | | | | | | | | | | | | | | Remove two assertions which can fail on legit code. Keyword arguments are checked later with better tests and raise a regular (TypeError) exception.
* | | | Issue #28999: Use Py_RETURN_NONE, Py_RETURN_TRUE and Py_RETURN_FALSE whereverSerhiy Storchaka2017-01-231-6/+3
| | | | | | | | | | | | | | | | possible but Coccinelle couldn't find opportunity.
* | | | Issue #28769: The result of PyUnicode_AsUTF8AndSize() and PyUnicode_AsUTF8()Serhiy Storchaka2017-01-221-2/+2
| | | | | | | | | | | | | | | | is now of type "const char *" rather of "char *".
* | | | Optimize methoddescr_call(): avoid temporary PyCFunctionVictor Stinner2017-01-181-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | Issue #29259, #29263. methoddescr_call() creates a PyCFunction object, call it and the destroy it. Add a new _PyMethodDef_RawFastCallDict() method to avoid the temporary PyCFunction object.
* | | | Remove unused func parameter of _PyStack_UnpackDict()Victor Stinner2017-01-181-2/+1
| | | | | | | | | | | | | | | | Issue #29259.
* | | | Add _PyArg_UnpackStack() function helperVictor Stinner2017-01-171-0/+10
| | | | | | | | | | | | | | | | Issue #29286.
* | | | _PyStack_UnpackDict() now returns -1 on errorVictor Stinner2017-01-171-5/+8
| | | | | | | | | | | | | | | | | | | | Issue #29286. Change _PyStack_UnpackDict() prototype to be able to notify of failure when args is NULL.
* | | | Add _PyArg_NoStackKeywords() helper functionVictor Stinner2017-01-171-1/+2
| | | | | | | | | | | | | | | | | | | | Issue #29286. Similar to _PyArg_NoKeywords(), but expects a tuple of keyword names, instead of a dict.
* | | | Add _PyArg_ParseStack() helper functionVictor Stinner2017-01-171-3/+13
| | | | | | | | | | | | | | | | | | | | Issue #29286. Function similar to PyArg_ParseTuple(), but uses a C array of PyObject* to pass arguments. Don't support the compatibility mode.
* | | | Rename _PyArg_ParseStack to _PyArg_ParseStackAndKeywordsVictor Stinner2017-01-172-4/+4
| | | | | | | | | | | | | | | | Issue #29286.
* | | | Add _PyStack_AsTupleSlice() helperVictor Stinner2017-01-161-0/+6
| | | |