summaryrefslogtreecommitdiffstats
path: root/Objects/funcobject.c
Commit message (Collapse)AuthorAgeFilesLines
* bpo-40268: Remove unused pycore_pymem.h includes (GH-19531)Victor Stinner2020-04-151-1/+0
|
* bpo-40268: Remove unused structmember.h includes (GH-19530)Victor Stinner2020-04-151-1/+1
| | | | | | If only offsetof() is needed: include stddef.h instead. When structmember.h is used, add a comment explaining that PyMemberDef is used.
* bpo-40268: Remove a few pycore_pystate.h includes (GH-19510)Victor Stinner2020-04-141-1/+0
|
* bpo-36347: stop using RESTRICTED constants (GH-12684)Jeroen Demeyer2020-02-181-6/+4
| | | | | | | | The constants `RESTRICTED` and `PY_WRITE_RESTRICTED` no longer have a meaning in Python 3. Therefore, CPython should not use them. CC @matrixise https://bugs.python.org/issue36347
* bpo-39245: Switch to public API for Vectorcall (GH-18460)Petr Viktorin2020-02-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The bulk of this patch was generated automatically with: for name in \ PyObject_Vectorcall \ Py_TPFLAGS_HAVE_VECTORCALL \ PyObject_VectorcallMethod \ PyVectorcall_Function \ PyObject_CallOneArg \ PyObject_CallMethodNoArgs \ PyObject_CallMethodOneArg \ ; do echo $name git grep -lwz _$name | xargs -0 sed -i "s/\b_$name\b/$name/g" done old=_PyObject_FastCallDict new=PyObject_VectorcallDict git grep -lwz $old | xargs -0 sed -i "s/\b$old\b/$new/g" and then cleaned up: - Revert changes to in docs & news - Revert changes to backcompat defines in headers - Nudge misaligned comments
* bpo-39573: Use Py_TYPE() macro in Objects directory (GH-18392)Victor Stinner2020-02-071-2/+2
| | | Replace direct access to PyObject.ob_type with Py_TYPE().
* bpo-19072: Make @classmethod support chained decorators (GH-8405)Berker Peksag2019-08-241-0/+4
|
* bpo-37151: remove _PyFunction_FastCallDict (GH-13864)Jeroen Demeyer2019-06-181-12/+1
|
* bpo-36974: tp_print -> tp_vectorcall_offset and tp_reserved -> tp_as_async ↵Jeroen Demeyer2019-05-311-5/+5
| | | | | | | | | (GH-13464) Automatically replace tp_print -> tp_vectorcall_offset tp_compare -> tp_as_async tp_reserved -> tp_as_async
* bpo-36974: rename _FastCallKeywords -> _Vectorcall (GH-13653)Jeroen Demeyer2019-05-301-1/+1
|
* bpo-36974: implement PEP 590 (GH-13185)Jeroen Demeyer2019-05-291-1/+3
| | | | | Co-authored-by: Jeroen Demeyer <J.Demeyer@UGent.be> Co-authored-by: Mark Shannon <mark@hotpy.org>
* bpo-36922: implement PEP-590 Py_TPFLAGS_METHOD_DESCRIPTOR (GH-13338)Jeroen Demeyer2019-05-281-1/+2
| | | Co-authored-by: Mark Shannon <mark@hotpy.org>
* bpo-36842: Implement PEP 578 (GH-12613)Steve Dower2019-05-231-0/+40
| | | Adds sys.audit, sys.addaudithook, io.open_code, and associated C APIs.
* bpo-35459: Use PyDict_GetItemWithError() instead of PyDict_GetItem(). (GH-11112)Serhiy Storchaka2019-02-251-1/+5
|
* Clarify the behavior of the staticmethod builtin (GH-4362)Jess Shapiro2018-12-241-2/+4
|
* bpo-33029: Fix signatures of getter and setter functions. (GH-10746)Serhiy Storchaka2018-11-271-12/+12
| | | Fix also return type for few other functions (clear, releasebuffer).
* bpo-35081: Add Include/internal/pycore_tupleobject.h (GH-10705)Victor Stinner2018-11-251-0/+1
| | | | Move _PyTuple_ITEMS() to a new header file: Include/internal/pycore_tupleobject.h
* bpo-35081: Add Include/internal/pycore_object.h (GH-10640)Victor Stinner2018-11-211-0/+1
| | | | Move _PyObject_GC_TRACK() and _PyObject_GC_UNTRACK() from Include/objimpl.h to Include/internal/pycore_object.h.
* bpo-35081: Rename internal headers (GH-10275)Victor Stinner2018-11-121-2/+2
| | | | | | | | | | | | | | Rename Include/internal/ headers: * pycore_hash.h -> pycore_pyhash.h * pycore_lifecycle.h -> pycore_pylifecycle.h * pycore_mem.h -> pycore_pymem.h * pycore_state.h -> pycore_pystate.h Add missing headers to Makefile.pre.in and PCbuild: * pycore_condvar.h. * pycore_hamt.h * pycore_pyhash.h
* bpo-35199: Add an internal _PyTuple_ITEMS() macro (GH-10434)Victor Stinner2018-11-091-1/+1
| | | | | | | * _PyTuple_ITEMS() gives access to the tuple->ob_item field and cast the first argument to PyTupleObject*. This internal macro is only usable if Py_BUILD_CORE is defined. * Replace &PyTuple_GET_ITEM(ob, 0) with _PyTuple_ITEMS(ob). * Replace PyTuple_GET_ITEM(op, 1) with &_PyTuple_ITEMS(ob)[1].
* bpo-35081: Add pycore_ prefix to internal header files (GH-10263)Victor Stinner2018-10-311-2/+2
| | | | | | | | | | | | | | | | | | | | * Rename Include/internal/ header files: * pyatomic.h -> pycore_atomic.h * ceval.h -> pycore_ceval.h * condvar.h -> pycore_condvar.h * context.h -> pycore_context.h * pygetopt.h -> pycore_getopt.h * gil.h -> pycore_gil.h * hamt.h -> pycore_hamt.h * hash.h -> pycore_hash.h * mem.h -> pycore_mem.h * pystate.h -> pycore_state.h * warnings.h -> pycore_warnings.h * PCbuild project, Makefile.pre.in, Modules/Setup: add the Include/internal/ directory to the search paths of header files. * Update includes. For example, replace #include "internal/mem.h" with #include "pycore_mem.h".
* bpo-33418: Add tp_clear for function object (GH-8058)INADA Naoki2018-07-041-13/+21
| | | | | Without tp_clear, GC can't break cyclic reference. It will cause memory leak when cyclic reference is created intentionally.
* bpo-31787: Prevent refleaks when calling __init__() more than once (GH-3995)Oren Milman2018-02-131-2/+2
|
* bpo-30860: Consolidate stateful runtime globals. (#3397)Eric Snow2017-09-081-0/+2
| | | | | | | * 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-30878: Fix error message when keyword arguments are passed (#2635)Sylvain2017-07-091-4/+4
| | | to staticmethod() and classmethod().
* bpo-29793: Convert some builtin types constructors to Argument Clinic. (#615)Serhiy Storchaka2017-03-191-26/+31
|
* 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.
* Issue #28839: Optimize function_call()Victor Stinner2017-01-031-47/+6
| | | | | | | function_call() now simply calls _PyFunction_FastCallDict(). _PyFunction_FastCallDict() is more efficient: it contains fast paths for the common case (optimized code object and no keyword argument).
* Issue #28959: Added private macro PyDict_GET_SIZE for retrieving the size of ↵Serhiy Storchaka2016-12-161-1/+1
| | | | dict.
* Issue #28139: Merge indentation fixes from 3.5 into 3.6Martin Panter2016-09-171-8/+12
|\
| * Issue #28139: Fix messed up indentationMartin Panter2016-09-171-8/+12
| | | | | | | | | | Also update the classmethod and staticmethod doc strings and comments to match the RST documentation.
* | Issue #26200: Added Py_SETREF and replaced Py_XSETREF with Py_SETREFSerhiy Storchaka2016-04-101-1/+1
|\ \ | |/ | | | | in places where Py_DECREF was used.
| * Issue #26200: Added Py_SETREF and replaced Py_XSETREF with Py_SETREFSerhiy Storchaka2016-04-101-1/+1
| | | | | | | | in places where Py_DECREF was used.
* | Issue #22570: Renamed Py_SETREF to Py_XSETREF.Serhiy Storchaka2016-04-061-11/+11
|\ \ | |/
| * Issue #22570: Renamed Py_SETREF to Py_XSETREF.Serhiy Storchaka2016-04-061-5/+5
| |
* | Issue #20440: Cleaning up the code by using Py_SETREF.Serhiy Storchaka2016-01-051-29/+6
|/
* Issue #20440: Massive replacing unsafe attribute setting code with specialSerhiy Storchaka2015-12-241-10/+5
| | | | macro Py_SETREF.
* Issue #18520: Fix PyFunction_NewWithQualName() error handlingVictor Stinner2013-07-221-10/+9
|
* Reindent PyFunction_NewWithQualName()Victor Stinner2013-07-221-49/+49
|
* use new generic __dict__ descriptor implementationsBenjamin Peterson2012-02-201-59/+3
|
* initialize __dict__ if neededBenjamin Peterson2012-02-191-6/+12
|
* use defaultsBenjamin Peterson2012-02-191-3/+3
|
* merge 3.2Benjamin Peterson2012-02-191-3/+1
|\
| * use Py_CLEARBenjamin Peterson2012-02-191-3/+1
| |
* | allow arbitrary attributes on classmethod and staticmethod (closes #14051)Benjamin Peterson2012-02-191-3/+27
| |
* | improve abstract property support (closes #11610)Benjamin Peterson2011-12-151-2/+44
| | | | | | | | Thanks to Darren Dale for patch.
* | PEP 3155 / issue #13448: Qualified name for classes and functions.Antoine Pitrou2011-11-251-2/+42
|/
* Merge branches/pep-0384.Martin v. Löwis2010-12-031-1/+1
|
* Remove redundant includes of headers that are already included by Python.h.Georg Brandl2010-11-301-1/+0
|
* Recorded merge of revisions 81029 via svnmerge fromAntoine Pitrou2010-05-091-662/+662
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines Untabify C files. Will watch buildbots. ........