83 Commits

Author SHA1 Message Date
Raymond Hettinger
87b5d9196e Revert 53667 2007-04-18 02:02:15 +00:00
Raymond Hettinger
f94e89c578 Extend work on rev 52962 and 53830 eliminating redundant PyObject_Hash() calls and fixing set/dict interoperability. 2007-03-20 21:45:04 +00:00
Raymond Hettinger
d621a6e8dc Fixup set/dict interoperability. 2007-02-19 20:45:46 +00:00
Raymond Hettinger
1bff796983 Extend work on revision 52962: Eliminate redundant calls to PyObject_Hash(). 2007-02-19 03:04:45 +00:00
Raymond Hettinger
fdf7bf8305 Bypass set specific optimizations for set and frozenset subclasses. 2007-02-08 00:49:51 +00:00
Raymond Hettinger
21191f4f0c Bug #1648179: set.update() not recognizing __iter__ overrides in dict subclasses. 2007-02-01 21:01:21 +00:00
Raymond Hettinger
535989ecb6 SF #1486663 -- Allow keyword args in subclasses of set() and frozenset(). 2007-01-11 18:21:04 +00:00
Raymond Hettinger
9cdf70399f For sets with cyclical reprs, emit '...' instead of recursing. 2006-12-29 18:49:13 +00:00
Raymond Hettinger
775ebe29a5 Backport fixes to set objects:
rev 52964 sf 1576657 KeyError unpacks tuple arguments
rev 52963 sf 1456209 obscure resizing vulnerability
rev 52962 redundant calls to PyObject_Hash()
2006-12-08 18:12:24 +00:00
Neal Norwitz
7e3ec048f9 Backport 52502:
Fix warnings with HP's C compiler.  It doesn't recognize that infinite
loops are, um, infinite.  These conditions should not be able to happen.
2006-10-28 21:37:16 +00:00
Georg Brandl
8de403a56a Backport rev. 51798 from trunk:
fix setobject.c refcounts and error checks.
2006-09-08 06:02:26 +00:00
Andrew M. Kuchling
52740be425 [Bug #1414697] Change docstring of set/frozenset types to specify that the contents are unique. Raymond, please feel free to edit or revert. 2006-07-29 15:10:32 +00:00
Neal Norwitz
04e39ec815 otherset is known to be non-NULL based on checks before and DECREF after.
DECREF otherset rather than XDECREF in error conditions too.

Reported by Klockwork #154.
2006-07-17 00:57:15 +00:00
Neal Norwitz
0f2783cb4c Use Py_ssize_t 2006-06-19 05:40:44 +00:00
Martin v. Löwis
ed8f783126 Clear dummy and emptyfrozenset, so that we don't have
dangling references in case of a Py_Initialize/Py_Finalize
cycle.
2006-04-15 12:47:23 +00:00
Armin Rigo
e170937af6 Ignore the references to the dummy objects used as deleted keys
in dicts and sets when computing the total number of references.
2006-04-12 17:06:05 +00:00
Martin v. Löwis
72d206776d Remove "static forward" declaration. Move constructors
after the type objects.
2006-04-11 09:04:12 +00:00
Barry Warsaw
176014ffad SF patch #1458476 with modifications based on discussions in python-dev. This
adds the following API calls: PySet_Clear(), _PySet_Next(), and
_PySet_Update().  The latter two are considered non-public.  Tests and
documentation (for the public API) are included.
2006-03-30 22:45:35 +00:00
Georg Brandl
347b30042b Remove unnecessary casts in type object initializers. 2006-03-30 11:57:00 +00:00
Raymond Hettinger
334b5b20f2 Tighten an overbroad and misleading assertion.
(Reported by Jim Jewett.)
2006-03-26 03:11:29 +00:00
Neal Norwitz
8c49c82889 Use Py_ssize_t for PySet_Size() like all the other Py*_Size() functions. 2006-03-04 18:41:19 +00:00
Martin v. Löwis
18e165558b Merge ssize_t branch. 2006-02-15 17:27:45 +00:00
Armin Rigo
f5b3e36493 Renamed _length_cue() to __length_hint__(). See:
http://mail.python.org/pipermail/python-dev/2006-February/060524.html
2006-02-11 21:32:43 +00:00
Neal Norwitz
0c6e2f1640 Remove some shadowed variables 2006-01-08 06:13:44 +00:00
Neal Norwitz
6576bd844f Prevent name pollution by making lots of internal functions static. 2005-11-13 18:41:28 +00:00