summaryrefslogtreecommitdiff
path: root/Objects/object.c
Commit message (Collapse)AuthorAgeFilesLines
...
| | * Merged revisions 76663 via svnmerge fromMark Dickinson2009-12-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r76663 | mark.dickinson | 2009-12-04 10:06:06 +0000 (Fri, 04 Dec 2009) | 1 line Issue #7430: Remove lingering reference to cmp in recursion error message. ........
| | * Merged revisions 74459 via svnmerge fromBenjamin Peterson2009-08-151-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r74459 | benjamin.peterson | 2009-08-15 08:23:05 -0500 (Sat, 15 Aug 2009) | 9 lines Merged revisions 74457 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r74457 | benjamin.peterson | 2009-08-15 08:16:38 -0500 (Sat, 15 Aug 2009) | 1 line #6707 fix a crash with dir() on an uninitialized module ........ ................
* | | Remove traces of division_warning left over from Python 2 (#10998)Éric Araujo2011-03-261-2/+0
|/ /
* | Merge branches/pep-0384.Martin v. Löwis2010-12-031-1/+13
| |
* | Remove redundant includes of headers that are already included by Python.h.Georg Brandl2010-11-301-1/+0
| |
* | follow up to #9778: define and use an unsigned hash typeBenjamin Peterson2010-10-231-4/+4
| |
* | make hashes always the size of pointers; introduce Py_hash_t #9778Benjamin Peterson2010-10-171-7/+7
| |
* | Use locale encoding if Py_FileSystemDefaultEncoding is not setVictor Stinner2010-10-151-4/+0
| | | | | | | | | | | | | | | | * PyUnicode_EncodeFSDefault(), PyUnicode_DecodeFSDefaultAndSize() and PyUnicode_DecodeFSDefault() use the locale encoding instead of UTF-8 if Py_FileSystemDefaultEncoding is NULL * redecode_filenames() functions and _Py_code_object_list (issue #9630) are no more needed: remove them
* | Issue #9630: Redecode filenames when setting the filesystem encodingVictor Stinner2010-09-291-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Redecode the filenames of: - all modules: __file__ and __path__ attributes - all code objects: co_filename attribute - sys.path - sys.meta_path - sys.executable - sys.path_importer_cache (keys) Keep weak references to all code objects until initfsencoding() is called, to be able to redecode co_filename attribute of all code objects.
* | fix formattingBenjamin Peterson2010-09-111-6/+6
| |
* | Issue #1868: Eliminate subtle timing issues in thread-local objects byAntoine Pitrou2010-08-281-48/+65
| | | | | | | | getting rid of the cached copy of thread-local attribute dictionary.
* | Issue #9294: remove dead code in Objects/object.c. Patch by Grant Limberg.Antoine Pitrou2010-07-271-13/+2
| |
* | Issue #8188: Introduce a new scheme for computing hashes of numbersMark Dickinson2010-05-231-49/+87
| | | | | | | | | | | | (instances of int, float, complex, decimal.Decimal and fractions.Fraction) that makes it easy to maintain the invariant that hash(x) == hash(y) whenever x and y have equal value.
* | Issue #8749: remove unused code in Objects/object.c. Thanks Yaniv Aknin.Mark Dickinson2010-05-221-24/+0
| |
* | Fix refleak in internal_print() introduced by myself in r81251Victor Stinner2010-05-171-0/+1
| | | | | | | | | | | | _PyUnicode_AsDefaultEncodedString() uses a magical PyUnicode attribute to automatically destroy PyUnicode_EncodeUTF8() result when the unicode string is destroyed.
* | PyObject_Dump() encodes unicode objects to utf8 with backslashreplace (insteadVictor Stinner2010-05-171-1/+3
| | | | | | | | of strict) error handler to escape surrogates
* | Recorded merge of revisions 81029 via svnmerge fromAntoine Pitrou2010-05-091-1226/+1226
| | | | | | | | | | | | | | | | | | | | 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 79809 via svnmerge fromMark Dickinson2010-04-061-3/+6
| | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r79809 | mark.dickinson | 2010-04-05 19:54:51 +0100 (Mon, 05 Apr 2010) | 1 line Use a better NaN test in _Py_HashDouble as well. ........
* | Merged revisions 79804 via svnmerge fromMark Dickinson2010-04-051-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r79804 | mark.dickinson | 2010-04-05 19:07:51 +0100 (Mon, 05 Apr 2010) | 5 lines Use a more robust infinity check in _Py_HashDouble. This fixes a test_decimal failure on FreeBSD 8.0. (modf apparently doesn't follow C99 Annex F on FreeBSD.) ........
* | Issue #6697: catch _PyUnicode_AsString() errors in getattr() and setattr()Victor Stinner2010-03-121-5/+12
| | | | | | | | builtin functions.
* | Issue #7430: Remove lingering reference to cmp in recursion error message.Mark Dickinson2009-12-041-1/+1
| |
* | Issue #6970: Remove redundant calls made when comparing objects.Mark Dickinson2009-11-151-1/+3
| |
* | Issue 7147 - remove ability to attempt to build Python without complex ↵Skip Montanaro2009-10-181-2/+1
| | | | | | | | number support (was broken anyway)
* | Merged revisions 74457 via svnmerge fromBenjamin Peterson2009-08-151-3/+5
| | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r74457 | benjamin.peterson | 2009-08-15 08:16:38 -0500 (Sat, 15 Aug 2009) | 1 line #6707 fix a crash with dir() on an uninitialized module ........
* | remove reference to PyCObjectBenjamin Peterson2009-07-011-3/+0
|/
* Merged revisions 72907 via svnmerge fromBenjamin Peterson2009-05-251-0/+2
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r72907 | benjamin.peterson | 2009-05-24 21:40:21 -0500 (Sun, 24 May 2009) | 1 line handle errors from _PyObject_LookupSpecial when __get__ fails ........
* these builtins have to be initializedBenjamin Peterson2009-05-091-0/+9
|
* this is now a bound methodBenjamin Peterson2009-05-081-1/+1
|
* Merged revisions 72461 via svnmerge fromBenjamin Peterson2009-05-081-9/+2
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r72461 | benjamin.peterson | 2009-05-07 22:06:00 -0500 (Thu, 07 May 2009) | 1 line add _PyObject_LookupSpecial to handle fetching special method lookup ........
* add a replacement API for PyCObject, PyCapsule #5630Benjamin Peterson2009-05-051-1/+4
| | | | | | All stdlib modules with C-APIs now use this. Patch by Larry Hastings
* Merged revisions 71734,71738-71739 via svnmerge fromBenjamin Peterson2009-04-201-6/+44
| | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r71734 | benjamin.peterson | 2009-04-18 17:15:26 -0500 (Sat, 18 Apr 2009) | 1 line many more types to initialize (I had to expose some of them) ........ r71738 | benjamin.peterson | 2009-04-18 21:32:42 -0500 (Sat, 18 Apr 2009) | 1 line initialize weakref some weakref types ........ r71739 | benjamin.peterson | 2009-04-18 21:40:43 -0500 (Sat, 18 Apr 2009) | 1 line make errors consistent ........
* Merged revisions 71722 via svnmerge fromBenjamin Peterson2009-04-181-7/+61
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r71722 | benjamin.peterson | 2009-04-18 15:12:47 -0500 (Sat, 18 Apr 2009) | 1 line try to initalize all builtin types with PyType_Ready to avoid problems like #5787 ........
* Merge revision 71222 from trunk: #5615: make it possible to configure ↵Georg Brandl2009-04-051-0/+6
| | | | --without-threads again.
* Merged revisions 69846 via svnmerge fromMark Dickinson2009-02-211-1/+1
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r69846 | mark.dickinson | 2009-02-21 20:27:01 +0000 (Sat, 21 Feb 2009) | 2 lines Issue #5341: Fix a variety of spelling errors. ........
* Merged revisions 69582-69583 via svnmerge fromAntoine Pitrou2009-02-131-15/+7
| | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r69582 | antoine.pitrou | 2009-02-13 14:52:33 +0100 (ven., 13 févr. 2009) | 4 lines Issue #5186: Reduce hash collisions for objects with no __hash__ method by rotating the object pointer by 4 bits to the right. ........ r69583 | antoine.pitrou | 2009-02-13 14:57:40 +0100 (ven., 13 févr. 2009) | 3 lines Fix compiler warning (gcc) ........
* Merged revisions 69436 via svnmerge fromMark Dickinson2009-02-081-1/+1
| | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r69436 | mark.dickinson | 2009-02-08 14:42:28 +0000 (Sun, 08 Feb 2009) | 10 lines Issue #789290: make sure that hash(2**63) == hash(2.**63) on 64-bit 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. ........
* Issue #1717: rename tp_compare to tp_reserved. I'll change theMark Dickinson2009-02-021-3/+3
| | | | | type of tp_compare in a separate commit, for ease of reversion should things go wrong.
* Issue #1717, continued: remove PyObject_Compare and Py_CmpToRich declarationsMark Dickinson2009-02-011-28/+9
| | | | | | from object.h; don't inherit tp_compare slot on subclasses; and raise TypeError when initializing a type that has a nonzero tp_compare slot. Fix up comparison-related comments in object.c and code.h.
* Issue #1717: remove the cmp builtin function, the C-API functionsMark Dickinson2009-02-011-100/+0
| | | | PyObject_Cmp, PyObject_Compare, and various support functions.
* Merged revisions 68560 via svnmerge fromAmaury Forgeot d'Arc2009-01-121-0/+14
| | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r68560 | amaury.forgeotdarc | 2009-01-13 00:36:55 +0100 (mar., 13 janv. 2009) | 6 lines #3720: Interpreter crashes when an evil iterator removes its own next function. 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. ........
* Merged revisions 68381 via svnmerge fromBenjamin Peterson2009-01-111-8/+13
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r68381 | martin.v.loewis | 2009-01-07 12:40:40 -0600 (Wed, 07 Jan 2009) | 2 lines Issue #4850: Change COUNT_ALLOCS variables to Py_ssize_t. ........
* Recorded merge of revisions 68051 via svnmerge fromNick Coghlan2008-12-301-0/+11
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r68051 | nick.coghlan | 2008-12-30 11:18:48 +1000 (Tue, 30 Dec 2008) | 1 line Issue #4701: implicitly call PyType_Ready from PyObject_Hash ........
* Merged revisions ↵Benjamin Peterson2008-12-211-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 67654,67676-67677,67681,67692,67725,67761,67784-67785,67787-67788,67802,67848-67850,67862-67864,67880,67882 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r67654 | georg.brandl | 2008-12-07 16:42:09 -0600 (Sun, 07 Dec 2008) | 2 lines #4457: rewrite __import__() documentation. ........ r67676 | benjamin.peterson | 2008-12-08 20:03:03 -0600 (Mon, 08 Dec 2008) | 1 line specify how things are copied ........ r67677 | benjamin.peterson | 2008-12-08 20:05:11 -0600 (Mon, 08 Dec 2008) | 1 line revert unrelated change to installer script ........ r67681 | jeremy.hylton | 2008-12-09 15:03:10 -0600 (Tue, 09 Dec 2008) | 2 lines Add simple unittests for Request ........ r67692 | amaury.forgeotdarc | 2008-12-10 18:03:42 -0600 (Wed, 10 Dec 2008) | 2 lines #1030250: correctly pass the dry_run option to the mkpath() function. ........ r67725 | benjamin.peterson | 2008-12-12 22:02:20 -0600 (Fri, 12 Dec 2008) | 1 line fix incorrect example ........ r67761 | benjamin.peterson | 2008-12-14 11:26:04 -0600 (Sun, 14 Dec 2008) | 1 line fix missing bracket ........ r67784 | georg.brandl | 2008-12-15 02:33:58 -0600 (Mon, 15 Dec 2008) | 2 lines #4446: document "platforms" argument for setup(). ........ r67785 | georg.brandl | 2008-12-15 02:36:11 -0600 (Mon, 15 Dec 2008) | 2 lines #4611: fix typo. ........ r67787 | georg.brandl | 2008-12-15 02:58:59 -0600 (Mon, 15 Dec 2008) | 2 lines #4578: fix has_key() usage in compiler package. ........ r67788 | georg.brandl | 2008-12-15 03:07:39 -0600 (Mon, 15 Dec 2008) | 2 lines #4568: remove limitation in varargs callback example. ........ r67802 | amaury.forgeotdarc | 2008-12-15 16:29:14 -0600 (Mon, 15 Dec 2008) | 4 lines #3632: the "pyo" macro from gdbinit can now run when the GIL is released. Patch by haypo. ........ r67848 | benjamin.peterson | 2008-12-18 20:28:56 -0600 (Thu, 18 Dec 2008) | 1 line fix typo ........ r67849 | benjamin.peterson | 2008-12-18 20:31:35 -0600 (Thu, 18 Dec 2008) | 1 line _call_method -> _callmethod and _get_value to _getvalue ........ r67850 | raymond.hettinger | 2008-12-19 03:06:07 -0600 (Fri, 19 Dec 2008) | 9 lines Fix-up and clean-up docs for int.bit_length(). * Replace dramatic footnote with in-line comment about possible round-off errors in logarithms of large numbers. * Add comments to the pure python code equivalent. * replace floor() with int() in the mathematical equivalent so the type is correct (should be an int, not a float). * add abs() to the mathematical equivalent so that it matches the previous line that it is supposed to be equivalent to. * make one combined example with a negative input. ........ r67862 | benjamin.peterson | 2008-12-19 20:48:02 -0600 (Fri, 19 Dec 2008) | 1 line copy sentence from docstring ........ r67863 | benjamin.peterson | 2008-12-19 20:51:26 -0600 (Fri, 19 Dec 2008) | 1 line add headings ........ r67864 | benjamin.peterson | 2008-12-19 20:57:19 -0600 (Fri, 19 Dec 2008) | 1 line beef up docstring ........ r67880 | benjamin.peterson | 2008-12-20 16:49:24 -0600 (Sat, 20 Dec 2008) | 1 line remove redundant sentence ........ r67882 | benjamin.peterson | 2008-12-20 16:59:49 -0600 (Sat, 20 Dec 2008) | 1 line add some recent releases to the list ........
* Issue #4296: Fix PyObject_RichCompareBool so that "x in [x]" evaluates toMark Dickinson2008-11-121-0/+9
| | | | | | | True, even when x doesn't compare equal to itself. This was a regression from 2.6. Reviewed by R. Hettinger and C. Heimes.
* Removed bytesmeth declaration in OyObject_Bytes. It's not used any more and ↵Christian Heimes2008-08-281-1/+1
| | | | causes a compiler warning.
* make bytes(o) respect __bytes__ #2415Benjamin Peterson2008-08-261-0/+39
| | | | | | This adds two new C-API functions: PyObject_Bytes and PyBytes_FromObject. Reviewer: Barry
* Rename PyUnicode_AsString -> _PyUnicode_AsString andMarc-André Lemburg2008-08-071-3/+3
| | | | | | | | | PyUnicode_AsStringAndSize -> _PyUnicode_AsStringAndSize to mark them for interpreter internal use only. We'll have to rework these APIs or create new ones for the purpose of accessing the UTF-8 representation of Unicode objects for 3.1.
* Manual forward port of 64962 - use PyObject_HashNotImplemented as a tp_hash ↵Nick Coghlan2008-07-151-4/+9
| | | | level indicator that the default hash implementation has not been inherited
* #2630: Implement PEP 3138.Georg Brandl2008-06-111-0/+27
| | | | | | | The repr() of a string now contains printable Unicode characters unescaped. The new ascii() builtin can be used to get a repr() with only ASCII characters in it. PEP and patch were written by Atsuo Ishimoto.
* Renamed PyString to PyBytesChristian Heimes2008-05-261-6/+6
|