diff options
author | Raymond Hettinger <python@rcn.com> | 2005-07-31 13:09:28 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2005-07-31 13:09:28 (GMT) |
commit | 9dcb17cb1a791cdca4383046d654512f92e7ba70 (patch) | |
tree | 8d9914bbc880341419b97458f0bd914a8b45438d /Objects/setobject.c | |
parent | 934d63eb409446836a3b5f62cfe6f0460a1a2657 (diff) | |
download | cpython-9dcb17cb1a791cdca4383046d654512f92e7ba70.zip cpython-9dcb17cb1a791cdca4383046d654512f92e7ba70.tar.gz cpython-9dcb17cb1a791cdca4383046d654512f92e7ba70.tar.bz2 |
Fix frozenset() ref count and a comment typo.
Diffstat (limited to 'Objects/setobject.c')
-rw-r--r-- | Objects/setobject.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Objects/setobject.c b/Objects/setobject.c index a279ec2..0430a8d 100644 --- a/Objects/setobject.c +++ b/Objects/setobject.c @@ -735,8 +735,7 @@ frozenset_new(PyTypeObject *type, PyObject *args, PyObject *kwds) if (type == &PyFrozenSet_Type) { if (emptyfrozenset == NULL) emptyfrozenset = make_new_set(type, NULL); - else - Py_INCREF(emptyfrozenset); + Py_INCREF(emptyfrozenset); return emptyfrozenset; } } else if (PyFrozenSet_CheckExact(iterable)) { @@ -803,7 +802,7 @@ set_len(PyObject *so) Useful for creating temporary frozensets from sets for membership testing in __contains__(), discard(), and remove(). Also useful for operations that update in-place (by allowing an intermediate result to be swapped - into one of original the inputs). + into one of the original inputs). */ static void |