summaryrefslogtreecommitdiffstats
path: root/Objects/object.c
Commit message (Collapse)AuthorAgeFilesLines
* Untabify C files. Will watch buildbots.Antoine Pitrou2010-05-091-1613/+1613
|
* Use a better NaN test in _Py_HashDouble as well.Mark Dickinson2010-04-051-3/+6
|
* Use a more robust infinity check in _Py_HashDouble.Mark Dickinson2010-04-051-3/+3
| | | | | This fixes a test_decimal failure on FreeBSD 8.0. (modf apparently doesn't follow C99 Annex F on FreeBSD.)
* Backported PyCapsule from 3.1, and converted most uses ofLarry Hastings2010-03-251-0/+4
| | | | CObject to PyCapsule.
* #6707 fix a crash with dir() on an uninitialized moduleBenjamin Peterson2009-08-151-3/+5
|
* Uninitialized file type would lead to __exit__ lookup failure when site.pyAntoine Pitrou2009-05-311-0/+3
| | | | tries to read *.pth files on interpreter startup.
* handle errors from _PyObject_LookupSpecial when __get__ failsBenjamin Peterson2009-05-251-0/+2
|
* this is now a bound methodBenjamin Peterson2009-05-081-1/+1
|
* add _PyObject_LookupSpecial to handle fetching special method lookupBenjamin Peterson2009-05-081-12/+3
|
* make errors consistentBenjamin Peterson2009-04-191-2/+2
|
* initialize weakref some weakref typesBenjamin Peterson2009-04-191-0/+6
|
* many more types to initialize (I had to expose some of them)Benjamin Peterson2009-04-181-1/+43
|
* initalize -> initializeBenjamin Peterson2009-04-181-4/+4
|
* try to initalize all builtin types with PyType_Ready to avoid problems like ↵Benjamin Peterson2009-04-181-8/+68
| | | | #5787
* #5615: make it possible to configure --without-threads again.Georg Brandl2009-04-051-0/+6
|
* Issue #5341: Fix a variety of spelling errors.Mark Dickinson2009-02-211-1/+1
|
* Fix compiler warning (gcc)Antoine Pitrou2009-02-131-1/+1
|
* Issue #5186: Reduce hash collisions for objects with no __hash__ method byAntoine Pitrou2009-02-131-15/+7
| | | | rotating the object pointer by 4 bits to the right.
* Issue #789290: make sure that hash(2**63) == hash(2.**63) on 64-bitMark Dickinson2009-02-081-1/+1
| | | | | | | | | | | platforms. The previous code was fragile, depending on the twin accidents that: (1) in C, casting the double value 2.**63 to long returns the integer value -2**63, and (2) in Python, hash(-2**63) == hash(2**63). There's already a test for this in test_hash.
* #3720: Interpreter crashes when an evil iterator removes its own next function.Amaury Forgeot d'Arc2009-01-121-0/+14
| | | | | | 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.
* Issue #4850: Change COUNT_ALLOCS variables to Py_ssize_t.Martin v. Löwis2009-01-071-8/+13
|
* Issue #4701: implicitly call PyType_Ready from PyObject_HashNick Coghlan2008-12-301-0/+11
|
* #3632: the "pyo" macro from gdbinit can now run when the GIL is released.Amaury Forgeot d'Arc2008-12-151-0/+3
| | | | Patch by haypo.
* Issue 2235: __hash__ is once again inherited by default, but inheritance can ↵Nick Coghlan2008-07-151-3/+8
| | | | be blocked explicitly so that collections.Hashable remains meaningful
* Issue 2517: Allow unicode messages in Exceptions again by correctly ↵Nick Coghlan2008-07-081-9/+31
| | | | bypassing the instance dictionary when looking up __unicode__ on new-style classes
* This reverts r63675 based on the discussion in this thread:Gregory P. Smith2008-06-091-29/+29
| | | | | | | 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.
* Renamed PyString to PyBytesChristian Heimes2008-05-261-29/+29
|
* First step of the C API rename:Christian Heimes2008-05-261-1/+1
| | | | | | renamed Include/bytesobject.h to Include/bytearrayobject.h renamed Include/stringobject.h to Include/bytesobject.h added Include/stringobject.h with aliases
* Use PyErr_WarnPy3k throughoutBenjamin Peterson2008-04-271-4/+4
|
* Merged revisions ↵Christian Heimes2008-03-261-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 61750,61752,61754,61756,61760,61763,61768,61772,61775,61805,61809,61812,61819,61917,61920,61930,61933-61934 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/trunk-bytearray ........ r61750 | christian.heimes | 2008-03-22 20:47:44 +0100 (Sat, 22 Mar 2008) | 1 line Copied files from py3k w/o modifications ........ r61752 | christian.heimes | 2008-03-22 20:53:20 +0100 (Sat, 22 Mar 2008) | 7 lines Take One * Added initialization code, warnings, flags etc. to the appropriate places * Added new buffer interface to string type * Modified tests * Modified Makefile.pre.in to compile the new files * Added bytesobject.c to Python.h ........ r61754 | christian.heimes | 2008-03-22 21:22:19 +0100 (Sat, 22 Mar 2008) | 2 lines Disabled bytearray.extend for now since it causes an infinite recursion Fixed serveral unit tests ........ r61756 | christian.heimes | 2008-03-22 21:43:38 +0100 (Sat, 22 Mar 2008) | 5 lines Added PyBytes support to several places: str + bytearray ord(bytearray) bytearray(str, encoding) ........ r61760 | christian.heimes | 2008-03-22 21:56:32 +0100 (Sat, 22 Mar 2008) | 1 line Fixed more unit tests related to type('') is not unicode ........ r61763 | christian.heimes | 2008-03-22 22:20:28 +0100 (Sat, 22 Mar 2008) | 2 lines Fixed more unit tests Fixed bytearray.extend ........ r61768 | christian.heimes | 2008-03-22 22:40:50 +0100 (Sat, 22 Mar 2008) | 1 line Implemented old buffer interface for bytearray ........ r61772 | christian.heimes | 2008-03-22 23:24:52 +0100 (Sat, 22 Mar 2008) | 1 line Added backport of the io module ........ r61775 | christian.heimes | 2008-03-23 03:50:49 +0100 (Sun, 23 Mar 2008) | 1 line Fix str assignement to bytearray. Assignment of a str of size 1 is interpreted as a single byte ........ r61805 | christian.heimes | 2008-03-23 19:33:48 +0100 (Sun, 23 Mar 2008) | 3 lines Fixed more tests Fixed bytearray() comparsion with unicode() Fixed iterator assignment of bytearray ........ r61809 | christian.heimes | 2008-03-23 21:02:21 +0100 (Sun, 23 Mar 2008) | 2 lines str(bytesarray()) now returns the bytes and not the representation of the bytearray object Enabled and fixed more unit tests ........ r61812 | christian.heimes | 2008-03-23 21:53:08 +0100 (Sun, 23 Mar 2008) | 3 lines Clear error PyNumber_AsSsize_t() fails Use CHARMASK for ob_svall access disabled a test with memoryview again ........ r61819 | christian.heimes | 2008-03-23 23:05:57 +0100 (Sun, 23 Mar 2008) | 1 line Untested updates to the PCBuild directory ........ r61917 | christian.heimes | 2008-03-26 00:57:06 +0100 (Wed, 26 Mar 2008) | 1 line The type system of Python 2.6 has subtle differences to 3.0's. I've removed the Py_TPFLAGS_BASETYPE flags from bytearray for now. bytearray can't be subclasses until the issues with bytearray subclasses are fixed. ........ r61920 | christian.heimes | 2008-03-26 01:44:08 +0100 (Wed, 26 Mar 2008) | 2 lines Disabled last failing test I don't understand what the test is testing and how it suppose to work. Ka-Ping, please check it out. ........ r61930 | christian.heimes | 2008-03-26 12:46:18 +0100 (Wed, 26 Mar 2008) | 1 line Re-enabled bytes warning code ........ r61933 | christian.heimes | 2008-03-26 13:20:46 +0100 (Wed, 26 Mar 2008) | 1 line Fixed a bug in the new buffer protocol. The buffer slots weren't copied into a subclass. ........ r61934 | christian.heimes | 2008-03-26 13:25:09 +0100 (Wed, 26 Mar 2008) | 1 line Re-enabled bytearray subclassing - all tests are passing. ........
* Make Py3k warnings consistent w.r.t. punctuation; also respect theGeorg Brandl2008-03-251-5/+6
| | | | EOL 80 limit and supply more alternatives in warning messages.
* #2346/#2347: add py3k warning for __methods__ and __members__. Patch by Jack ↵Georg Brandl2008-03-211-0/+10
| | | | Diederich.
* Add py3k warnings for object, type, cell and dict comparisons. This should ↵Steven Bethard2008-03-181-1/+11
| | | | resolve issue2342 and partly resolve issue2373.
* Fix test67.py from issue #1303614.Guido van Rossum2008-01-241-0/+5
|
* Re-apply patch #1700288 (first applied in r59931, rolled back in r59940)Amaury Forgeot d'Arc2008-01-141-0/+4
| | | | | | 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-4/+0
|
* Patch #1700288: Method cache optimization, by Armin Rigo, ported toGeorg Brandl2008-01-121-0/+4
| | | | 2.6 by Kevin Jacobs.
* #1629: Renamed Py_Size, Py_Type and Py_Refcnt to Py_SIZE, Py_TYPE and ↵Christian Heimes2007-12-191-34/+34
| | | | Py_REFCNT. Macros for b/w compatibility are available.
* Backport of _abccoll.py by Benjamin Arangueren, issue 1383.Guido van Rossum2007-11-221-1/+1
| | | | With some changes of my own thrown in (e.g. backport of r58107).
* tuple.__repr__ did not consider a reference loop as it is not possible fromBrett Cannon2007-09-301-0/+5
| | | | | | | | | | Python code; but it is possible from C. object.__str__ had the issue of not expecting a type to doing something within it's tp_str implementation that could trigger an infinite recursion, but it could in C code.. Both found thanks to BaseException and how it handles its repr. Closes issue #1686386. Thanks to Thomas Herve for taking an initial stab at coming up with a solution.
* Add a bunch of GIL release/acquire points in tp_print implementations and forBrett Cannon2007-09-171-0/+4
| | | | | | PyObject_Print(). Closes issue #1164.
* PEP 3123: Provide forward compatibility with Python 3.0, while keepingMartin v. Löwis2007-07-211-40/+40
| | | | | backwards compatibility. Add Py_Refcnt, Py_Type, Py_Size, and PyVarObject_HEAD_INIT.
* Add -3 option to the interpreter to warn about features that areNeal Norwitz2007-05-231-0/+1
| | | | | | | deprecated and will be changed/removed in Python 3.0. This patch is mostly from Anthony. I tweaked some format and added a little doc.
* Remove warning: funcion declaration isn't a prototypeJeremy Hylton2007-03-161-2/+1
|
* Typo and grammar fixes.Georg Brandl2007-03-131-3/+3
|
* Backport from Py3k branch:Georg Brandl2007-03-121-96/+169
| | | | | | | Patch #1591665: implement the __dir__() special function lookup in PyObject_Dir. Had to change a few bits of the patch because classobjs and __methods__ are still in Py2.6.
* Slightly revised version of patch #1538956:Marc-André Lemburg2006-08-141-17/+0
| | | | | | | | | | Replace UnicodeDecodeErrors raised during == and != compares of Unicode and other objects with a new UnicodeWarning. All other comparisons continue to raise exceptions. Exceptions other than UnicodeDecodeErrors are also left untouched.
* Patch #1507676: improve exception messages in abstract.c, object.c and ↵Georg Brandl2006-06-181-12/+18
| | | | typeobject.c.
* Correct some value converting strangenesses.Georg Brandl2006-05-291-1/+1
|
* Comment typo fixAndrew M. Kuchling2006-04-181-1/+1
|