| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Handle PyTuple_New(0) failure.
|
|
|
|
|
| |
Issue #27128: PyFile_WriteObject() now calls _PyObject_FastCall() to avoid the
creation of a temporary tuple.
|
|
|
|
|
|
|
| |
Issue #27128: calliter_iternext() now calls _PyObject_FastCall() to avoid a
temporary empty tuple.
Cleanup also the code to reduce the indentation level.
|
|
|
|
|
| |
Issue #27128: slot_tp_iter() now calls _PyObject_FastCall() to avoid a
temporary empty tuple.
|
|
|
|
|
| |
Issue #27128: slot_nb_bool() now calls _PyObject_FastCall() to avoid a
temporary empty tuple to call the slot function.
|
|
|
|
| |
Use an error label to reduce the level of indentation.
|
|
|
|
|
| |
slot_sq_item() now calls _PyObject_FastCall() to avoid the creation of a
temporary tuple of 1 item to pass the 'item' argument to the slot function.
|
|
|
|
|
|
|
| |
* Invert condition of test to avoid levels of indentation
* Remove useless Py_XDECREF(args) in the error block
* Replace Py_XDECREF(func) with Py_DECREF(func) in the error block: func cannot
be NULL when reaching the error block
|
|
|
|
|
|
| |
Issue #27128. The call_method() and call_maybe() functions of typeobject.c now
use fast call for empty format string to avoid the creation of a temporary
empty tuple.
|
|
|
|
| |
Issue #27128. Move va_start/va_end around Py_VaBuildValue().
|
|\ |
|
| |
| |
| |
| |
| | |
Issue #27128. Fix a reference leak if creating the tuple to pass positional
parameters fails.
|
|\ \
| |/ |
|
| |
| |
| |
| |
| | |
Issue #27128. Fix a reference leak if creating the tuple to pass positional
parameters fails.
|
| |
| |
| |
| |
| | |
Issue #27128. Modify slot_sq_contains() and slot_tp_richcompare() to use fast
call to avoid a temporary tuple to pass a single positional parameter.
|
| |
| |
| |
| |
| |
| | |
Issue #27128: arg=>args, kw=>kwargs.
Same change for PyEval_CallObjectWithKeywords().
|
| |
| |
| |
| |
| |
| | |
Issue #27128, PyObject_CallFunction(), _PyObject_FastCall() and callmethod():
if the format string of parameters is empty, avoid the creation of an empty
tuple: call _PyObject_FastCall() without parameters.
|
| |
| |
| |
| | |
Issue #27128.
|
| |
| |
| |
| |
| |
| |
| | |
Make callmethod() less weird: don't decrement func reference counter,
the caller is now responsible to do that.
Issue #27128.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Make call_function_tail() less weird: don't decrement args reference counter,
the caller is now responsible to do that. The caller now also checks if args is
NULL.
Issue #27128.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Issue #27128: Modify call_function_tail() to use _PyObject_FastCall() when args
is not a tuple to avoid the creation of a temporary tuple.
call_function_tail() is used by:
* PyObject_CallFunction()
* PyObject_CallMethod()
* _PyObject_CallMethodId()
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Issue #27128: Add _PyObject_FastCall(), a new calling convention avoiding a
temporary tuple to pass positional parameters in most cases, but create a
temporary tuple if needed (ex: for the tp_call slot).
The API is prepared to support keyword parameters, but the full implementation
will come later (_PyFunction_FastCall() doesn't support keyword parameters
yet).
Add also:
* _PyStack_AsTuple() helper function: convert a "stack" of parameters to
a tuple.
* _PyCFunction_FastCall(): fast call implementation for C functions
* _PyFunction_FastCall(): fast call implementation for Python functions
|
| |
| |
| |
| |
| |
| | |
PyModule_NewObject already sets md_dict to PyDict_New():
m->md_dict = PyDict_New();
|
| |
| |
| |
| | |
Patch by Eryk Sun and Emanuel Barry.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- Issue #25958: Support "anti-registration" of special methods from
various ABCs, like __hash__, __iter__ or __len__. All these (and
several more) can be set to None in an implementation class and the
behavior will be as if the method is not defined at all.
(Previously, this mechanism existed only for __hash__, to make
mutable classes unhashable.) Code contributed by Andrew Barnert and
Ivan Levkivskyi.
|
| |
| |
| |
| |
| | |
The z variable is known to be a fresh number which cannot be shared, Py_SIZE()
can be used directly to negate the number.
|
| |
| |
| |
| |
| | |
and iterables. Speed up to 3 times for short objects. Original patch by
Naoki Inada.
|
| |
| |
| |
| | |
implemented with using Argument Clinic.
|
| |
| |
| |
| | |
as path in compile() and similar functions is now deprecated.
|
|\ \
| |/ |
|
| | |
|
| |
| |
| |
| |
| |
| | |
ESHUTDOWN is also exposed conditionally in Modules/errnomodule.c.
Patch by Ed Schouten.
|
| |
| |
| |
| |
| |
| | |
* Added versionadded directives
* Deleted duplicate sentence from __init_subclass__ docstring
* Modernized tests
|
| |
| |
| |
| |
| |
| | |
- __init_subclass__ called when new subclasses defined
- __set_name__ called when descriptors are part of a
class definition
|
|\ \
| |/ |
|
| |
| |
| |
| | |
Based on patch by Ville Skyttä.
|
|\ \
| |/
| |
| | |
as the Python program to be used for file generation during the build.
|
| |
| |
| |
| | |
as the Python program to be used for file generation during the build.
|
| |
| |
| |
| | |
Patch by Xiang Zhang.
|
|\ \
| |/ |
|
| |
| |
| |
| | |
Patch by Xiang Zhang.
|
| |
| |
| |
| | |
Patch by INADA Naoki.
|
|\ \
| |/ |
|
| |
| |
| |
| | |
Patch by Xiang Zhang.
|
| | |
|
|\ \
| |/
| |
| | |
concatenations. Patch by Xiang Zhang.
|
| |
| |
| |
| | |
concatenations. Patch by Xiang Zhang.
|
|\ \
| |/
| |
| | |
hashes.
|
| |
| |
| |
| | |
Patch by Jaysinh Shukla.
|
| |
| |
| |
| |
| | |
bytearray for integers in and out of the Py_ssize_t range.
Patch by Xiang Zhang.
|