diff options
author | Tim Peters <tim.peters@gmail.com> | 2001-05-28 22:30:08 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2001-05-28 22:30:08 (GMT) |
commit | 4324aa3572f123883e67a807b633b3d0d452a267 (patch) | |
tree | 60fd3ab62d4cc58c75e4cf58599e3b7d59a5cfb1 /Objects | |
parent | 6a922372ad24a86306d70889e67edb03815d07c0 (diff) | |
download | cpython-4324aa3572f123883e67a807b633b3d0d452a267.zip cpython-4324aa3572f123883e67a807b633b3d0d452a267.tar.gz cpython-4324aa3572f123883e67a807b633b3d0d452a267.tar.bz2 |
Cruft cleanup: Removed the unused last_is_sticky argument from the internal
_PyTuple_Resize().
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/abstract.c | 4 | ||||
-rw-r--r-- | Objects/tupleobject.c | 7 |
2 files changed, 5 insertions, 6 deletions
diff --git a/Objects/abstract.c b/Objects/abstract.c index c1d7789..63fe7d5 100644 --- a/Objects/abstract.c +++ b/Objects/abstract.c @@ -1220,7 +1220,7 @@ PySequence_Tuple(PyObject *v) n += 10; else n += 100; - if (_PyTuple_Resize(&result, n, 0) != 0) { + if (_PyTuple_Resize(&result, n) != 0) { Py_DECREF(item); goto Fail; } @@ -1230,7 +1230,7 @@ PySequence_Tuple(PyObject *v) /* Cut tuple back if guess was too large. */ if (j < n && - _PyTuple_Resize(&result, j, 0) != 0) + _PyTuple_Resize(&result, j) != 0) goto Fail; Py_DECREF(it); diff --git a/Objects/tupleobject.c b/Objects/tupleobject.c index 16e0b12..94f1859 100644 --- a/Objects/tupleobject.c +++ b/Objects/tupleobject.c @@ -488,11 +488,10 @@ PyTypeObject PyTuple_Type = { is only one module referencing the object. You can also think of it as creating a new tuple object and destroying the old one, only more efficiently. In any case, don't use this if the tuple may already be - known to some other part of the code. The last_is_sticky is not used - and must always be false. */ + known to some other part of the code. */ int -_PyTuple_Resize(PyObject **pv, int newsize, int last_is_sticky) +_PyTuple_Resize(PyObject **pv, int newsize) { register PyTupleObject *v; register PyTupleObject *sv; @@ -500,7 +499,7 @@ _PyTuple_Resize(PyObject **pv, int newsize, int last_is_sticky) int sizediff; v = (PyTupleObject *) *pv; - if (v == NULL || !PyTuple_Check(v) || last_is_sticky || + if (v == NULL || !PyTuple_Check(v) || (v->ob_size != 0 && v->ob_refcnt != 1)) { *pv = 0; Py_XDECREF(v); |