summaryrefslogtreecommitdiffstats
path: root/Objects/descrobject.c
Commit message (Collapse)AuthorAgeFilesLines
* bpo-23699: Use a macro to reduce boilerplate code in rich comparison ↵stratakis2017-11-021-33/+2
| | | | functions (GH-793)
* bpo-31410: Optimized calling wrapper and classmethod descriptors. (#3481)Serhiy Storchaka2017-09-211-29/+33
|
* 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-30534: Fixed error messages when pass keyword arguments (#1901)Serhiy Storchaka2017-06-061-1/+1
| | | | | | | 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-29865: Use PyXXX_GET_SIZE macros rather than Py_SIZE for concrete types. ↵Serhiy Storchaka2017-03-211-1/+1
| | | | (#748)
* bpo-29793: Convert some builtin types constructors to Argument Clinic. (#615)Serhiy Storchaka2017-03-191-105/+121
|
* Issue #29263: LOAD_METHOD support for C methodsINADA Naoki2017-02-021-0/+38
| | | | Calling builtin method is at most 10% faster.
* 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.
* Optimize methoddescr_call(): avoid temporary PyCFunctionVictor Stinner2017-01-181-11/+9
| | | | | | 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 #28959: Added private macro PyDict_GET_SIZE for retrieving the size of ↵Serhiy Storchaka2016-12-161-1/+1
| | | | dict.
* Use PyObject_CallFunctionObjArgs()Victor Stinner2016-12-091-1/+1
| | | | | | | | | Issue #28915: Replace PyObject_CallFunction() with PyObject_CallFunctionObjArgs() when the format string was only made of "O" formats, PyObject* arguments. PyObject_CallFunctionObjArgs() avoids the creation of a temporary tuple and doesn't have to parse a format string.
* Use _PyObject_CallMethodIdObjArgs()Victor Stinner2016-12-081-1/+2
| | | | | | | | | Issue #28915: Replace _PyObject_CallMethodId() with _PyObject_CallMethodIdObjArgs() when the format string only use the format 'O' for objects, like "(O)". _PyObject_CallMethodIdObjArgs() avoids the code to parse a format string and avoids the creation of a temporary tuple.
* Backed out changeset b9c9691c72c5Victor Stinner2016-12-041-1/+1
| | | | | | 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-1/+1
| | | | | | | | | | | | | | * 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.
* replace Py_(u)intptr_t with the c99 standard typesBenjamin Peterson2016-09-061-1/+1
|
* Issue #27809: Use _PyObject_FastCallDict()Victor Stinner2016-08-221-24/+10
| | | | | | | | | Modify: * builtin_sorted() * classmethoddescr_call() * methoddescr_call() * wrapperdescr_call()
* Issue #26811: gc.get_objects() no longer contains a broken tuple with NULLSerhiy Storchaka2016-05-041-15/+15
|\ | | | | | | pointer.
| * Issue #26811: gc.get_objects() no longer contains a broken tuple with NULLSerhiy Storchaka2016-05-041-15/+15
| | | | | | | | pointer.
* | Issue #22570: Renamed Py_SETREF to Py_XSETREF.Serhiy Storchaka2016-04-061-1/+1
|\ \ | |/
| * Issue #22570: Renamed Py_SETREF to Py_XSETREF.Serhiy Storchaka2016-04-061-1/+1
| |
* | Issue #25923: Added more const qualifiers to signatures of static and ↵Serhiy Storchaka2015-12-251-1/+1
|/ | | | private functions.
* Issue #20440: Massive replacing unsafe attribute setting code with specialSerhiy Storchaka2015-12-241-2/+1
| | | | macro Py_SETREF.
* Fixed indentation of Python examples in C comments.Serhiy Storchaka2015-06-101-6/+6
|\
| * Fixed indentation of Python examples in C comments.Serhiy Storchaka2015-06-101-6/+6
| |
* | Issue #24276: Fixed optimization of property descriptor getter.Serhiy Storchaka2015-05-241-4/+21
| |
* | Issue #24064: Help property() support GCRaymond Hettinger2015-05-131-1/+9
| |
* | Issue #24064: Property() docstrings are now writeable.Raymond Hettinger2015-05-131-1/+1
| | | | | | | | (Patch by Berker Peksag.)
* | Issue #23910: Optimize property() getter calls. Patch by Joe JevnikRaymond Hettinger2015-04-301-1/+9
|/
* Issue #20530: Argument Clinic's signature format has been revised again.Larry Hastings2014-02-091-6/+6
| | | | | | | The new syntax is highly human readable while still preventing false positives. The syntax also extends Python syntax to denote "self" and positional-only parameters, allowing inspect.Signature objects to be totally accurate for all supported builtins in Python 3.4.
* Issue #20326: Argument Clinic now uses a simple, unique signature toLarry Hastings2014-01-281-18/+6
| | | | | | | | | | annotate text signatures in docstrings, resulting in fewer false positives. "self" parameters are also explicitly marked, allowing inspect.Signature() to authoritatively detect (and skip) said parameters. Issue #20326: Argument Clinic now generates separate checksums for the input and output sections of the block, allowing external tools to verify that the input has not changed (and thus the output is not out-of-date).
* Issue #20189: Four additional builtin types (PyTypeObject,Larry Hastings2014-01-241-19/+36
| | | | | | PyMethodDescr_Type, _PyMethodWrapper_Type, and PyWrapperDescr_Type) have been modified to provide introspection information for builtins. Also: many additional Lib, test suite, and Argument Clinic fixes.
* Remove an errant extra \ within a docstring.Gregory P. Smith2013-11-251-1/+1
|\
| * Remove an errant extra \ within a docstring.Gregory P. Smith2013-11-251-1/+1
| |
* | mergeRaymond Hettinger2013-11-241-5/+9
|\ \ | |/
| * Document that @property can incorporate a docstring from the getter method. ↵Raymond Hettinger2013-11-241-5/+9
| | | | | | | | Improve readabilty with additional whitespace.
* | Issue #17810: Implement PEP 3154, pickle protocol 4.Antoine Pitrou2013-11-231-5/+40
| | | | | | | | Most of the work is by Alexandre.
* | Use Py_intptr_t to store the difference between two pointers, instead of intVictor Stinner2013-05-071-1/+1
| | | | | | | | Fix a compiler warning on Windows 64-bit
* | Issue #15422: get rid of PyCFunction_New macroAndrew Svetlov2012-12-251-4/+4
|/
* merge 3.2 (#14699)Benjamin Peterson2012-05-011-3/+41
|\
| * fix calling the classmethod descriptor directly (closes #14699)Benjamin Peterson2012-05-011-3/+41
| |
* | Issue #14386: Expose the dict_proxy internal type as types.MappingProxyTypeVictor Stinner2012-04-151-60/+110
| |
* | fix possible NULL dereferenceBenjamin Peterson2011-12-171-1/+3
| |
* | improve abstract property support (closes #11610)Benjamin Peterson2011-12-151-1/+38
| | | | | | | | Thanks to Darren Dale for patch.
* | Issue #13577: various kinds of descriptors now have a __qualname__ attribute.Antoine Pitrou2011-12-121-0/+51
| | | | | | | | Patch by sbt.
* | Port SetAttrString/HasAttrString to SetAttrId/GetAttrId.Martin v. Löwis2011-10-141-1/+1
| |
* | Rename _Py_identifier to _Py_IDENTIFIER.Martin v. Löwis2011-10-141-6/+6
| |
* | Use identifier API for PyObject_GetAttrString.Martin v. Löwis2011-10-101-1/+2
| |
* | Add API for static strings, primarily good for identifiers.Martin v. Löwis2011-10-091-5/+10
|/ | | | Thanks to Konrad Schöbel and Jasper Schulz for helping with the mass-editing.
* make sure to initialize the method wrapper typeBenjamin Peterson2011-09-011-6/+3
|
* (Merge 3.1) Issue #9756: When calling a method descriptor or a slot wrapperVictor Stinner2011-05-011-3/+6
|\ | | | | | | | | | | descriptor, the check of the object type doesn't read the __class__ attribute anymore. Fix a crash if a class override its __class__ attribute (e.g. a proxy of the str type).