| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Remove two assertions which can fail on legit code. Keyword arguments are
checked later with better tests and raise a regular (TypeError) exception.
|
| | | |
| | | |
| | | |
| | | | |
possible but Coccinelle couldn't find opportunity.
|
| | | |
| | | |
| | | |
| | | | |
is now of type "const char *" rather of "char *".
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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.
|
| | | |
| | | |
| | | |
| | | | |
Issue #29259.
|
| | | |
| | | |
| | | |
| | | | |
Issue #29286.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Issue #29286. Change _PyStack_UnpackDict() prototype to be able to notify of
failure when args is NULL.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Issue #29286. Similar to _PyArg_NoKeywords(), but expects a tuple of keyword
names, instead of a dict.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Issue #29286. Function similar to PyArg_ParseTuple(), but uses a C array of
PyObject* to pass arguments. Don't support the compatibility mode.
|
| | | |
| | | |
| | | |
| | | | |
Issue #29286.
|
| | | | |
|
|\ \ \ \
| |/ / /
| | | |
| | | |
| | | | |
KeyError could be raised when cached function with full cache was
simultaneously called from differen threads with the same uncached arguments.
|
| |\ \ \
| | | |/
| | |/|
| | | |
| | | | |
KeyError could be raised when cached function with full cache was
simultaneously called from differen threads with the same uncached arguments.
|
| | |/
| | |
| | |
| | |
| | | |
KeyError could be raised when cached function with full cache was
simultaneously called from differen threads with the same uncached arguments.
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Issue #29234: Inlining _PyStack_AsTuple() into callers increases their stack
consumption, Disable inlining to optimize the stack consumption.
Add _Py_NO_INLINE: use __attribute__((noinline)) of GCC and Clang.
It reduces the stack consumption, bytes per call, before => after:
test_python_call: 1040 => 976 (-64 B)
test_python_getitem: 976 => 912 (-64 B)
test_python_iterator: 1120 => 1056 (-64 B)
=> total: 3136 => 2944 (- 192 B)
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Issue #29233: Replace the inefficient _PyObject_VaCallFunctionObjArgs() with
_PyObject_FastCall() in call_method() and call_maybe().
Only a few functions call call_method() and call it with a fixed number of
arguments. Avoid the complex and expensive _PyObject_VaCallFunctionObjArgs()
function, replace it with an array allocated on the stack with the exact number
of argumlents.
It reduces the stack consumption, bytes per call, before => after:
test_python_call: 1168 => 1152 (-16 B)
test_python_getitem: 1344 => 1008 (-336 B)
test_python_iterator: 1568 => 1232 (-336 B)
Remove the _PyObject_VaCallFunctionObjArgs() function which became useless.
Rename it to object_vacall() and make it private.
|
|\ \ \
| |/ / |
|
| | |
| | |
| | |
| | |
| | | |
Fix backward compatibility issue, HAVE_LONG_LONG was defined but empty, whereas
it is defined as 1 in Python 3.5.
|
| | | |
|
|\ \ \
| |/ /
| | |
| | | |
WeakValueDictionary when collecting from another thread.
|
| |\ \
| | |/
| | |
| | | |
WeakValueDictionary when collecting from another thread.
|
| | |
| | |
| | |
| | | |
WeakValueDictionary when collecting from another thread.
|
|\ \ \
| |/ /
| | |
| | |
| | | |
available only when Py_LIMITED_API is set to the PY_VERSION_HEX value of
the minimum Python version supporting this API.
|
| | |
| | |
| | |
| | |
| | | |
available only when Py_LIMITED_API is set to the PY_VERSION_HEX value of
the minimum Python version supporting this API.
|
| | |
| | |
| | |
| | | |
Calling function is up to 5% faster.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Issue #28838: The documentation is of the Python C API is more complete and
more up to date than this old comment.
Removal suggested by Antoine Pitrou.
|
|\ \ \
| |/ / |
|
| |\ \
| | |/ |
|
| | | |
|
| | |
| | |
| | |
| | | |
collections.namedtuple() now supports tuples with more than 255 elements.
|
| | |
| | |
| | |
| | | |
dict.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Rewrite all comments to use the same style than other Python header files:
comment functions *before* their declaration, no newline between the comment
and the declaration.
Reformat some comments, add newlines, to make them easier to read.
Quote argument like 'arg' to mention an argument in a comment.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Special thanks to INADA Naoki for pushing the patch through
the last mile, Serhiy Storchaka for reviewing the code, and to
Victor Stinner for suggesting the idea (originally implemented
in the PyPy project).
|
| | |
| | |
| | |
| | |
| | | |
Issue #28915: Similar to _PyObject_CallFunctionObjArgs() but use va_list to
pass arguments.
|
| | |
| | |
| | |
| | |
| | | |
Issue #28915: Similar to Py_VaBuildValue(), but work on a C array of PyObject*,
instead of creating a tuple.
|
|\ \ \
| |/ / |
|
| | | |
|
| | |
| | |
| | |
| | | |
will be cherrypicked and merged here.
|
| | | |
|
| | |
| | |
| | |
| | | |
Remove most indentation to move code at the left.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Issue #28838: Rename parameters of the "calls" functions of the Python C API.
* Rename 'callable_object' and 'func' to 'callable': any Python callable object
is accepted, not only Python functions
* Rename 'method' and 'nameid' to 'name' (method name)
* Rename 'o' to 'obj'
* Move, fix and update documentation of PyObject_CallXXX() functions
in abstract.h
* Update also the documentaton of the C API (update parameter names)
|
|\ \ \
| |/ / |
|
| |\ \
| | |/ |
|
| | | |
|
|\ \ \
| |/ / |
|
| |\ \
| | |/ |
|