Gregory P. Smith
27cbcd6241
Fix the internals of our hash functions to used unsigned values during hash
computation as the overflow behavior of signed integers is undefined.
In practice we require compiling everything with -fwrapv which forces overflow
to be defined as twos compliment but this keeps the code cleaner for checkers
or in the case where someone has compiled it without -fwrapv or their
compiler's equivalent.
Found by Clang trunk's Undefined Behavior Sanitizer (UBSan).
Cleanup only - no functionality or hash values change.
13 years ago
Ezio Melotti
0e1af282b8
Fix typo.
14 years ago
David Malcolm
49526f48fc
Issue #14785 : Add sys._debugmallocstats() to help debug low-level memory allocation issues
14 years ago
Antoine Pitrou
a701388de1
Rename _PyIter_GetBuiltin to _PyObject_GetBuiltin, and do not include it in the stable ABI.
14 years ago
Kristján Valur Jónsson
31668b8f7a
Issue #14288 : Serialization support for builtin iterators.
14 years ago
Antoine Pitrou
093ce9cd8c
Issue #6695 : Full garbage collection runs now clear the freelist of set objects.
Initial patch by Matthias Troffaes.
14 years ago
Benjamin Peterson
2b50a01d11
remove unused variable
14 years ago
Benjamin Peterson
e3b5eda8be
remove unused variable
14 years ago
Petri Lehtinen
e0aa803714
Fix the return value of set_discard (issue #10519 )
14 years ago
Petri Lehtinen
a39de111a5
Fix the return value of set_discard (issue #10519 )
14 years ago
Petri Lehtinen
5acc27ebe4
Avoid unnecessary recursive function calls ( closes #10519 )
14 years ago
Petri Lehtinen
5f4d870668
Avoid unnecessary recursive function calls ( closes #10519 )
14 years ago
Martin v. Löwis
bd928fef42
Rename _Py_identifier to _Py_IDENTIFIER.
15 years ago
Martin v. Löwis
1ee1b6fe0d
Use identifier API for PyObject_GetAttrString.
15 years ago
Martin v. Löwis
d63a3b8beb
Implement PEP 393.
15 years ago
Mark Dickinson
57e683e53e
Issue #1621 : Fix undefined behaviour in bytes.__hash__, str.__hash__, tuple.__hash__, frozenset.__hash__ and set indexing operations.
15 years ago
Brian Curtin
dfc80e3d97
Replace Py_NotImplemented returns with the macro form Py_RETURN_NOTIMPLEMENTED.
The macro was introduced in #12724 .
15 years ago
Victor Stinner
4f2dab5c33
Revert my commit 7ba176c2f558: "Avoid useless "++" at the end of functions
Warnings found by the Clang Static Analyzer."
Most people prefer ++ at the end of functions.
15 years ago
Victor Stinner
a1a807b6ef
set_repr(): handle correctly PyUnicode_FromUnicode() error (MemoryError)
Bug found by the Clang Static Analyzer.
15 years ago
Victor Stinner
97e561ef24
Avoid useless "++" at the end of functions
Warnings found by the Clang Static Analyzer.
15 years ago
Éric Araujo
48049911d6
Fix obscure set crashers ( #8420 ). Backport of d56b3cafb1e6, reviewed by Raymond.
15 years ago
Éric Araujo
f079c9bfbf
Fix obscure set crashers ( #4420 ). Backport of d56b3cafb1e6, reviewed by Raymond.
15 years ago
Antoine Pitrou
715f3cd10d
Issue #8685 : Speed up set difference `a - b` when source set `a` is
much larger than operand `b`. Patch by Andrew Bennetts.
15 years ago
Armin Rigo
39e32a7e81
Revert r86726. Sorry about interfering with the rc.
15 years ago
Armin Rigo
442e4477fe
A no-op change. It looks like this call was not meant to be a recursive
call, but just call the helper (which the recursive call ends up doing).
15 years ago
Antoine Pitrou
fbb1c6191c
Follow up to #9778 : fix regressions on 64-bit Windows builds
16 years ago
Georg Brandl
00da4e0b5a
Remove unneeded casts to hashfunc.
16 years ago
Benjamin Peterson
8f67d0893f
make hashes always the size of pointers; introduce Py_hash_t #9778
16 years ago
Georg Brandl
2d444496b3
Reindent.
16 years ago
Raymond Hettinger
faf7b7f4ec
Issue 8420: Fix obscure set crashers.
16 years ago
Daniel Stutzbach
928d4eeee8
Removed an extraneous semicolon
16 years ago
Antoine Pitrou
f72006f442
Merged revisions 84146-84147,84150 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r84146 | antoine.pitrou | 2010-08-17 19:55:07 +0200 (mar., 17 août 2010) | 4 lines
Issue #9612 : The set object is now 64-bit clean under Windows.
........
r84147 | antoine.pitrou | 2010-08-17 20:30:06 +0200 (mar., 17 août 2010) | 3 lines
Fix <deque iterator>.__length_hint__() under 64-bit Windows.
........
r84150 | antoine.pitrou | 2010-08-17 21:33:30 +0200 (mar., 17 août 2010) | 3 lines
Clean some 64-bit issues. Also, always spell "ssize_t" "Py_ssize_t".
........
16 years ago
Antoine Pitrou
671b4d948e
Issue #9612 : The set object is now 64-bit clean under Windows.
16 years ago
Raymond Hettinger
3ad323ecaf
Issue8757: Implicit set-to-frozenset conversion not thread-safe.
16 years ago
Raymond Hettinger
51ced7afe7
Issue8757: Implicit set-to-frozenset conversion not thread-safe.
16 years ago
Raymond Hettinger
38bf2ccf4c
Issue8757: Implicit set-to-frozenset conversion not thread-safe.
16 years ago
Antoine Pitrou
7f14f0d8a0
Recorded merge of revisions 81032 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
................
r81032 | antoine.pitrou | 2010-05-09 17:52:27 +0200 (dim., 09 mai 2010) | 9 lines
Recorded merge of revisions 81029 via svnmerge from
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.
........
................
16 years ago
Antoine Pitrou
f95a1b3c53
Recorded merge of revisions 81029 via svnmerge from
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.
........
16 years ago
Antoine Pitrou
c7c96a90bc
Recorded merge of revisions 81029 via svnmerge from
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.
........
16 years ago
Antoine Pitrou
c83ea137d7
Untabify C files. Will watch buildbots.
16 years ago
Raymond Hettinger
3fb156caa4
Issue 8436: set.__init__ accepts keyword args
16 years ago
Raymond Hettinger
dbe961215a
Issue 8436: set.__init__ accepts keyword args
16 years ago
Raymond Hettinger
efa19849ce
Issue 8436: set.__init__ accepts keyword args
16 years ago
Raymond Hettinger
35b76027f9
Issue 8436: set.__init__ accepts keyword args
16 years ago
Raymond Hettinger
b136a9c9d7
Issue 8420: Fix ref counting problem in set_repr().
16 years ago
Raymond Hettinger
f88db8de76
Issue 8420: Fix ref counting problem in set_repr().
16 years ago
Victor Stinner
08b36bdab4
Merged revisions 78886 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r78886 | victor.stinner | 2010-03-13 01:13:22 +0100 (sam., 13 mars 2010) | 2 lines
Issue #7818 : set().test_c_api() doesn't expect a set('abc'), modify the set.
........
16 years ago
Victor Stinner
17d905449d
Issue #7818 : set().test_c_api() doesn't expect a set('abc'), modify the set.
16 years ago
Ezio Melotti
807e98e0af
Merged revisions 78541 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
................
r78541 | ezio.melotti | 2010-03-01 06:08:34 +0200 (Mon, 01 Mar 2010) | 17 lines
Merged revisions 78515-78516,78522 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r78515 | georg.brandl | 2010-02-28 20:19:17 +0200 (Sun, 28 Feb 2010) | 1 line
#8030 : make builtin type docstrings more consistent: use "iterable" instead of "seq(uence)", use "new" to show that set() always returns a new object.
........
r78516 | georg.brandl | 2010-02-28 20:26:37 +0200 (Sun, 28 Feb 2010) | 1 line
The set types can also be called without arguments.
........
r78522 | ezio.melotti | 2010-03-01 01:59:00 +0200 (Mon, 01 Mar 2010) | 1 line
#8030 : more docstring fix for builtin types.
........
................
16 years ago
Ezio Melotti
7f807b79d8
Merged revisions 78515-78516,78522 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r78515 | georg.brandl | 2010-02-28 20:19:17 +0200 (Sun, 28 Feb 2010) | 1 line
#8030 : make builtin type docstrings more consistent: use "iterable" instead of "seq(uence)", use "new" to show that set() always returns a new object.
........
r78516 | georg.brandl | 2010-02-28 20:26:37 +0200 (Sun, 28 Feb 2010) | 1 line
The set types can also be called without arguments.
........
r78522 | ezio.melotti | 2010-03-01 01:59:00 +0200 (Mon, 01 Mar 2010) | 1 line
#8030 : more docstring fix for builtin types.
........
16 years ago