summaryrefslogtreecommitdiffstats
path: root/Include/object.h
Commit message (Collapse)AuthorAgeFilesLines
* Issue #22453: Fexed reference leaks when format error messages in ceval.c.Serhiy Storchaka2014-11-181-1/+3
| | | | Warn against the use of leaking macro PyObject_REPR().
* Issue #6477: Revert fbb97f6eb3b3 as it broke test_xpickle.Alexandre Vassalotti2013-12-011-3/+0
|
* Issue #6477: Added pickling support for singletons and their types.Alexandre Vassalotti2013-12-011-0/+3
|
* Issue #17703: Fix a regression where an illegal use of Py_DECREF() after ↵Antoine Pitrou2013-04-151-5/+11
| | | | interpreter finalization can cause a crash.
* Issue #13992: The trashcan mechanism is now thread-safe. This eliminatesAntoine Pitrou2012-09-051-9/+18
| | | | | | | | | | | 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.
* merge 2.6Benjamin Peterson2012-02-211-0/+4
|\
| * ensure no one tries to hash things before the random seed is foundBenjamin Peterson2012-02-211-0/+4
| |
* | merge 2.6 with hash randomization fixBenjamin Peterson2012-02-211-0/+6
|\ \ | |/
| * - Issue #13703: oCERT-2011-003: add -R command-line option and PYTHONHASHSEEDBarry Warsaw2012-02-211-0/+6
| | | | | | | | | | | | environment variable, to provide an opt-in way to protect against denial of service attacks due to hash collisions within the dict and set types. Patch by David Malcolm, based on work by Victor Stinner.
| * Recorded merge of revisions 81029 via svnmerge fromAntoine Pitrou2010-05-091-279/+279
| | | | | | | | | | | | | | | | | | | | 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. ........
| * Merged revisions 71163 via svnmerge fromBenjamin Peterson2009-04-041-7/+5
| | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r71163 | benjamin.peterson | 2009-04-04 11:05:51 -0500 (Sat, 04 Apr 2009) | 1 line revert r71159 since it broke the build ........
| * Merged revisions 71159 via svnmerge fromMatthias Klose2009-04-041-5/+7
| | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r71159 | matthias.klose | 2009-04-04 17:51:23 +0200 (Sa, 04 Apr 2009) | 2 lines - Py_DECREF: Add `do { ... } while (0)' to avoid compiler warnings. ........
* | Merged revisions 84344 via svnmerge fromAntoine Pitrou2010-08-281-0/+7
| | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r84344 | antoine.pitrou | 2010-08-28 20:17:03 +0200 (sam., 28 août 2010) | 4 lines Issue #1868: Eliminate subtle timing issues in thread-local objects by getting rid of the cached copy of thread-local attribute dictionary. ........
* | Untabify C files. Will watch buildbots.Antoine Pitrou2010-05-091-283/+283
| |
* | add _PyObject_LookupSpecial to handle fetching special method lookupBenjamin Peterson2009-05-081-0/+1
| |
* | Issue #1113244: Py_XINCREF, Py_DECREF, Py_XDECREF: Add `do { ... } while (0)'Matthias Klose2009-04-051-2/+2
| | | | | | | | to avoid compiler warnings.
* | - Py_DECREF: Add `do { ... } while (0)' to avoid compiler warnings.Matthias Klose2009-04-051-5/+7
| | | | | | | | (avoiding brown paper typo this time)
* | revert r71159 since it broke the buildBenjamin Peterson2009-04-041-7/+5
| |
* | - Py_DECREF: Add `do { ... } while (0)' to avoid compiler warnings.Matthias Klose2009-04-041-5/+7
| |
* | Issue #2396: backport the memoryview object.Antoine Pitrou2009-04-021-13/+15
| |
* | #3720: Interpreter crashes when an evil iterator removes its own next function.Amaury Forgeot d'Arc2009-01-121-0/+1
|/ | | | | | Now the slot is filled with a function that always raises. Will not backport: extensions compiled with 2.6.x would not run on 2.6.0.
* sort of backport 66038 by aliasing PyObject_Bytes to PyObject_StrBenjamin Peterson2008-08-261-0/+1
|
* Hopeful fix for issue 1878: remove Py_TPFLAGS_HAVE_VERSION_TAG fromGuido van Rossum2008-08-191-6/+19
| | | | Py_TPFLAGS_DEFAULT when not building the core.
* Issue #3139: Make buffer-interface thread-safe wrt. PyArg_ParseTuple,Martin v. Löwis2008-08-121-1/+2
| | | | | | | by denying s# to parse objects that have a releasebuffer procedure, and introducing s*. More module might need to get converted to use s*.
* Issue 2235: __hash__ is once again inherited by default, but inheritance can ↵Nick Coghlan2008-07-151-0/+1
| | | | be blocked explicitly so that collections.Hashable remains meaningful
* Issue #3274: Use a less common identifier for the temporary variableAlexandre Vassalotti2008-07-131-2/+2
| | | | in Py_CLEAR().
* Revert 64424, 64438, and 64439.Raymond Hettinger2008-06-241-3/+0
|
* Make bin() implementation parallel oct() and hex() so that int/long ↵Raymond Hettinger2008-06-201-0/+3
| | | | subclasses can override or so that other classes can support.
* This reverts r63675 based on the discussion in this thread:Gregory P. Smith2008-06-091-2/+2
| | | | | | | http://mail.python.org/pipermail/python-dev/2008-June/079988.html Python 2.6 should stick with PyString_* in its codebase. The PyBytes_* names in the spirit of 3.0 are available via a #define only. See the email thread.
* Remove locking part of new buffer protocol.Travis E. Oliphant2008-06-061-11/+0
|
* #2989: add PyType_Modified().Georg Brandl2008-05-281-0/+1
|
* Renamed PyString to PyBytesChristian Heimes2008-05-261-2/+2
|
* Remove Py_Refcnt, Py_Type, Py_Size, as they were added onlyMartin v. Löwis2008-04-241-5/+0
| | | | for backwards compatibility, yet 2.5 did not have them at all.
* NIL => NULLBenjamin Peterson2008-03-281-1/+1
|
* Add necessary headers to back-port new buffer protocol to Python 2.6Travis E. Oliphant2008-03-171-0/+68
|
* Move abc._Abstract into object by adding a new flag Py_TPFLAGS_IS_ABSTRACT,Jeffrey Yasskin2008-02-281-0/+3
| | | | | | | | which forbids constructing types that have it set. The effect is to speed ./python.exe -m timeit -s 'import abc' -s 'class Foo(object): __metaclass__ = abc.ABCMeta' 'Foo()' up from 2.5us to 0.201us. This fixes issue 1762.
* Added clear cache methods to clear the internal type lookup cache for ref ↵Christian Heimes2008-01-271-0/+1
| | | | leak test runs.
* Re-apply patch #1700288 (first applied in r59931, rolled back in r59940)Amaury Forgeot d'Arc2008-01-141-0/+8
| | | | | | now that ctypes uses a more supported method to create types: Method cache optimization, by Armin Rigo, ported to 2.6 by Kevin Jacobs.
* Back out r59931 - test_ctypes fails with it.Georg Brandl2008-01-131-8/+0
|
* Patch #1700288: Method cache optimization, by Armin Rigo, ported toGeorg Brandl2008-01-121-0/+8
| | | | 2.6 by Kevin Jacobs.
* #1629: Renamed Py_Size, Py_Type and Py_Refcnt to Py_SIZE, Py_TYPE and ↵Christian Heimes2007-12-191-12/+17
| | | | Py_REFCNT. Macros for b/w compatibility are available.
* PEP 3123: Provide forward compatibility with Python 3.0, while keepingMartin v. Löwis2007-07-211-12/+18
| | | | | backwards compatibility. Add Py_Refcnt, Py_Type, Py_Size, and PyVarObject_HEAD_INIT.
* Variation of patch # 1624059 to speed up checking if an object is a subclassNeal Norwitz2007-02-251-1/+14
| | | | | | | | | | | | | | | | | | of some of the common builtin types. Use a bit in tp_flags for each common builtin type. Check the bit to determine if any instance is a subclass of these common types. The check avoids a function call and O(n) search of the base classes. The check is done in the various Py*_Check macros rather than calling PyType_IsSubtype(). All the bits are set in tp_flags when the type is declared in the Objects/*object.c files because PyType_Ready() is not called for all the types. Should PyType_Ready() be called for all types? If so and the change is made, the changes to the Objects/*object.c files can be reverted (remove setting the tp_flags). Objects/typeobject.c would also have to be modified to add conditions for Py*_CheckExact() in addition to each the PyType_IsSubtype check.
* Patch #1538606, Patch to fix __index__() clipping.Neal Norwitz2006-08-121-1/+1
| | | | | | | I modified this patch some by fixing style, some error checking, and adding XXX comments. This patch requires review and some changes are to be expected. I'm checking in now to get the greatest possible review and establish a baseline for moving forward. I don't want this to hold up release if possible.
* Remove types from type_list if they have no objectsMartin v. Löwis2006-04-181-1/+3
| | | | | and unlist_types_without_objects is set. Give dump_counts a FILE* argument.
* There were no comments explaining what Py_CLEAR() did orTim Peters2006-04-151-0/+34
| | | | | | | why it's important. Now there are ;-) If someone else hasn't already, I'll add a Py_CLEAR cleanup task to the TODO Wiki next.
* Ignore the references to the dummy objects used as deleted keysArmin Rigo2006-04-121-0/+3
| | | | in dicts and sets when computing the total number of references.
* Checking in the code for PEP 357.Guido van Rossum2006-03-071-1/+8
| | | | | | This was mostly written by Travis Oliphant. I've inspected it all; Neal Norwitz and MvL have also looked at it (in an earlier incarnation).
* Use Py_ssize_t for _Py_RefTotal.Neal Norwitz2006-03-041-1/+1
| | | | I tried to handle Win64 properly, but please review.
* Make ob_refcnt and tp_maxalloc (and friends) Py_ssize_t.Martin v. Löwis2006-03-011-4/+4
|