summaryrefslogtreecommitdiffstats
path: root/Objects/call.c
Commit message (Collapse)AuthorAgeFilesLines
* bpo-31835: Optimize also FASTCALL using __future__ (#4087)Victor Stinner2017-10-251-2/+2
| | | | | _PyFunction_FastCallDict() and _PyFunction_FastCallKeywords() now also takes the fast path if the code object uses __future__ (CO_FUTURE_xxx flags).
* bpo-30860: Consolidate stateful runtime globals. (#3397)Eric Snow2017-09-081-0/+1
| | | | | | | * group the (stateful) runtime globals into various topical structs * consolidate the topical structs under a single top-level _PyRuntimeState struct * add a check-c-globals.py script that helps identify runtime globals Other globals are excluded (see globals.txt and check-c-globals.py).
* bpo-31347: _PyObject_FastCall_Prepend: do not call memcpy if args might not ↵Benjamin Peterson2017-09-051-3/+3
| | | | | be null (#3329) Passing NULL as the second argument to to memcpy is undefined behavior even if the size is 0.
* bpo-30923: Silence fall-through warnings included in -Wextra since gcc-7.0. ↵Stefan Krah2017-08-211-2/+2
| | | | (#3157)
* bpo-30640: Fix undefined behavior in _PyFunction_FastCallDict() and ↵Zackery Spytz2017-07-311-1/+1
| | | | | PyEval_EvalCodeEx() (#2919) k + 1 was calculated with k = NULL.
* bpo-29464: Rename METH_FASTCALL to METH_FASTCALL|METH_KEYWORDS and make (#1955)Serhiy Storchaka2017-07-031-2/+19
| | | | | the bare METH_FASTCALL be used for functions with positional-only parameters.
* bpo-30534: Fixed error messages when pass keyword arguments (#1901)Serhiy Storchaka2017-06-061-24/+25
| | | | | | | to functions implemented in C that don't support this. Also unified error messages for functions that don't take positional or keyword arguments.
* bpo-29924: Remove useless argument (#854)Sylvain2017-03-271-1/+1
|
* bpo-29865: Use PyXXX_GET_SIZE macros rather than Py_SIZE for concrete types. ↵Serhiy Storchaka2017-03-211-6/+8
| | | | (#748)
* bpo-29735: Optimize partial_call(): avoid tuple (#516)Victor Stinner2017-03-141-0/+16
| | | | | | | | * 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-33/+24
| | | | | | | | | | | | 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-29684: Fix regression of PyEval_CallObjectWithKeywords (GH-87)INADA Naoki2017-03-011-6/+7
| | | It should raise TypeError when kwargs is not a dict.
* Document why functools.partial() must copy kwargs (#253)Victor Stinner2017-02-231-2/+2
| | | | Add a comment to prevent further attempts to avoid a copy for optimization.
* bpo-29524: Add Objects/call.c file (#12)Victor Stinner2017-02-121-0/+1368
| | | | | | | | | * 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-1368/+0
| | | | | 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-0/+1368
* 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.