summaryrefslogtreecommitdiffstats
path: root/Objects/typeobject.c
Commit message (Collapse)AuthorAgeFilesLines
* Issue #27225: Fixed a reference leak in type_new when setting __new__ fails.Serhiy Storchaka2016-06-051-1/+5
| | | | Original patch by Xiang Zhang.
* Backed out changeset e7062dd9085e (#25731)Benjamin Peterson2016-05-281-1/+1
|
* Issue #26718: super.__init__ no longer leaks memory if called multiple times.Serhiy Storchaka2016-04-131-3/+3
| | | | NOTE: A direct call of super.__init__ is not endorsed!
* Issue #22570: Renamed Py_SETREF to Py_XSETREF.Serhiy Storchaka2016-04-061-1/+1
|
* fix hash member name (closes #22847)Benjamin Peterson2016-02-071-1/+1
|
* fix debug assertionBenjamin Peterson2016-02-051-1/+1
|
* Issue #22847: Improve method cache efficiency.Antoine Pitrou2014-11-141-5/+38
|
* set tp_new from the class in the hierarchy that actually owns the descriptor ↵Benjamin Peterson2016-01-191-1/+1
| | | | | | (closes #25731) Debugging by Eryk Sun.
* Comment out two tests that won't pass now after reverting the typeobject.cBarry Warsaw2016-01-111-24/+0
| | | | | change. Also, as per further discussion, we'll just remove the regressing code in typeobject.c
* Issue #22995: [UPDATE] Comment out the one of the pickleability tests inBarry Warsaw2016-01-111-0/+9
| | | | _PyObject_GetState() due to regressions observed in Cython-based projects.
* Issue #25961: Fixed compilation error and a leak in type constructor.Serhiy Storchaka2015-12-311-4/+11
|
* Issue #25961: Disallowed null characters in the type name.Serhiy Storchaka2015-12-301-4/+11
|
* Issue #22995: Instances of extension types with a state that aren'tSerhiy Storchaka2015-12-301-7/+32
| | | | | | subclasses of list or dict and haven't implemented any pickle-related methods (__reduce__, __reduce_ex__, __getnewargs__, __getnewargs_ex__, or __getstate__), can no longer be pickled. Including memoryview.
* Issue #20440: Massive replacing unsafe attribute setting code with specialSerhiy Storchaka2015-12-241-4/+2
| | | | macro Py_SETREF.
* Issue #24097: Fixed crash in object.__reduce__() if slot name is freed insideSerhiy Storchaka2015-11-251-1/+5
| | | | __getattr__. Original patch by Antoine Pitrou.
* Issue #22995: Default implementation of __reduce__ and __reduce_ex__ nowSerhiy Storchaka2015-11-121-0/+7
| | | | rejects builtin types with not defined __new__.
* prevent unacceptable bases from becoming bases through multiple inheritance ↵Benjamin Peterson2015-10-071-7/+6
| | | | (#24806)
* Fixed indentation of Python examples in C comments.Serhiy Storchaka2015-06-101-4/+4
|
* Issue #22079: Py3k warning now is issued in PyType_Ready() instead ofSerhiy Storchaka2015-03-221-6/+9
| | | | | raising TypeError when statically allocated type subclasses dynamically allocated type
* Issue #23629: Fix the default __sizeof__ implementation for variable-sized ↵Antoine Pitrou2015-03-101-1/+1
| | | | objects.
* Issue #22079: PyType_Ready() now checks that statically allocated type hasSerhiy Storchaka2015-01-281-0/+14
| | | | no dynamically allocated bases.
* remove tautological condition (closes #22954)Benjamin Peterson2014-11-271-1/+1
|
* Closes #22772: fix __ifloordiv__ and __itruediv__ docstring.Georg Brandl2014-10-311-2/+2
|
* Issue #16447: Fix potential segfault when setting __name__ on a class.Mark Dickinson2013-04-131-1/+5
|
* list slotdefs in offset order rather than sorting them (closes #17610)Benjamin Peterson2013-04-071-131/+114
| | | | | | This means we can remove our usage of qsort() than relied on undefined behavior. Backport by Zbigniew Halas.
* #7963: fix error message when 'object' called with arguments.R David Murray2013-02-191-2/+2
| | | | Patch by Alexander Belopolsky.
* Improve tooltips by listing the most common argument pattern first.Raymond Hettinger2013-01-191-1/+1
|
* Fixed memory leak in error branch of object_repr which may leak a reference ↵Christian Heimes2012-09-101-1/+3
| | | | to mod when type_name returns NULL. CID 715371
* Fixed possible reference leak to mod when type_name() returns NULLChristian Heimes2012-09-101-1/+3
|
* Issue #13992: The trashcan mechanism is now thread-safe. This eliminatesAntoine Pitrou2012-09-051-0/+5
| | | | | | | | | | | sporadic crashes in multi-thread programs when several long deallocator chains ran concurrently and involved subclasses of built-in container types. Because of this change, a couple extension modules compiled for 2.7.4 (those which use the trashcan mechanism, despite it being undocumented) will not be loadable by 2.7.3 and earlier. However, extension modules compiled for 2.7.3 and earlier will be loadable by 2.7.4.
* Issue #15604: Update uses of PyObject_IsTrue() to check for and handle ↵Antoine Pitrou2012-08-151-5/+7
| | | | | | errors correctly. Patch by Serhiy Storchaka.
* fix possible refleak (closes #14752)Benjamin Peterson2012-05-081-2/+4
|
* don't use a slot wrapper from a different special method (closes #14658)Benjamin Peterson2012-04-241-2/+3
| | | | | | | This also alters the fix to #11603. Specifically, setting __repr__ to object.__str__ now raises a recursion RuntimeError when str() or repr() is called instead of silently bypassing the recursion. I believe this behavior is more correct.
* check to make sure the attribute is a string (#14334)Benjamin Peterson2012-03-161-0/+7
|
* allow cycles throught the __dict__ slot to be cleared (closes #1469629)Benjamin Peterson2012-03-081-2/+7
| | | | Patch from Armin, test from me.
* Fix the fix for issue #12149: it was incorrect, although it had the sideAntoine Pitrou2011-12-151-8/+10
| | | | | effect of appearing to resolve the issue. Thanks to Mark Shannon for noticing.
* Issue #13161: fix doc strings of __i*__ operatorsEli Bendersky2011-11-111-11/+11
|
* fix possible refleaksBenjamin Peterson2011-08-171-1/+3
|
* Issue #11603: Fix a crash when __str__ is rebound as __repr__.Antoine Pitrou2011-07-151-1/+1
| | | | Patch by Andreas Stührk.
* Issue #12149: Update the method cache after a type's dictionnary getsAntoine Pitrou2011-07-121-0/+2
| | | | | | | | | cleared by the garbage collector. This fixes a segfault when an instance and its type get caught in a reference cycle, and the instance's deallocator calls one of the methods on the type (e.g. when subclassing IOBase). Diagnosis and patch by Davide Rizzo.
* use '->' to indicate return valuesBenjamin Peterson2011-05-241-3/+3
|
* #11565: Fix several typos. Patch by Piotr Kasprzyk.Ezio Melotti2011-03-161-2/+2
|
* Merged revisions 88069 via svnmerge fromBenjamin Peterson2011-01-171-1/+0
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r88069 | benjamin.peterson | 2011-01-17 13:54:55 -0600 (Mon, 17 Jan 2011) | 1 line remove unneeded assertion ........
* Merged revisions 88066 via svnmerge fromBenjamin Peterson2011-01-171-1/+1
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r88066 | benjamin.peterson | 2011-01-17 13:44:46 -0600 (Mon, 17 Jan 2011) | 1 line correct assertion ........
* Merged revisions 88063 via svnmerge fromBenjamin Peterson2011-01-171-4/+2
| | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r88063 | benjamin.peterson | 2011-01-17 13:24:34 -0600 (Mon, 17 Jan 2011) | 4 lines turn some checks into assertions, since they are implied by the caller Reviewed by Georg. ........
* Merged revisions 87960 via svnmerge fromBenjamin Peterson2011-01-121-2/+2
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r87960 | benjamin.peterson | 2011-01-12 12:56:07 -0600 (Wed, 12 Jan 2011) | 1 line use PyErr_SetString instead of PyErr_Format ........
* Merged revisions 87952-87954 via svnmerge fromBenjamin Peterson2011-01-121-2/+11
| | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r87952 | benjamin.peterson | 2011-01-12 09:24:27 -0600 (Wed, 12 Jan 2011) | 1 line move this test to test_descr; it's not abc specific ........ r87953 | benjamin.peterson | 2011-01-12 09:25:02 -0600 (Wed, 12 Jan 2011) | 1 line oops, wrong class ........ r87954 | benjamin.peterson | 2011-01-12 09:34:01 -0600 (Wed, 12 Jan 2011) | 1 line don't segfault on deleting __abstractmethods__ #10892 ........
* Merged revisions 85193 via svnmerge fromBenjamin Peterson2010-10-031-2/+2
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r85193 | benjamin.peterson | 2010-10-02 21:13:39 -0500 (Sat, 02 Oct 2010) | 1 line typo ........
* Merged revisions 85154 via svnmerge fromBenjamin Peterson2010-10-021-2/+5
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r85154 | benjamin.peterson | 2010-10-01 19:03:31 -0500 (Fri, 01 Oct 2010) | 1 line type.__abstractmethods__ should raise an AttributeError #10006 ........
* Merged revisions 84320 via svnmerge fromBenjamin Peterson2010-08-251-2/+2
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r84320 | benjamin.peterson | 2010-08-25 18:13:17 -0500 (Wed, 25 Aug 2010) | 1 line basicsize and itemsize are Py_ssize_t #9688 ........