diff options
author | Raymond Hettinger <python@rcn.com> | 2005-09-24 21:23:05 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2005-09-24 21:23:05 (GMT) |
commit | 6b27cda64386195cd07dfb686e9486f1c4bc3159 (patch) | |
tree | 277a5c96e9683c63b573b508f8c4bd2d1374aed8 /Python/bltinmodule.c | |
parent | 9ceebd544516908e67c0f0d92c7a5f484e12beeb (diff) | |
download | cpython-6b27cda64386195cd07dfb686e9486f1c4bc3159.zip cpython-6b27cda64386195cd07dfb686e9486f1c4bc3159.tar.gz cpython-6b27cda64386195cd07dfb686e9486f1c4bc3159.tar.bz2 |
Convert iterator __len__() methods to a private API.
Diffstat (limited to 'Python/bltinmodule.c')
-rw-r--r-- | Python/bltinmodule.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c index dca8555..3e5f4eb 100644 --- a/Python/bltinmodule.c +++ b/Python/bltinmodule.c @@ -221,7 +221,7 @@ builtin_filter(PyObject *self, PyObject *args) goto Fail_arg; /* Guess a result list size. */ - len = PyObject_Size(seq); + len = _PyObject_LengthCue(seq); if (len < 0) { if (!PyErr_ExceptionMatches(PyExc_TypeError) && !PyErr_ExceptionMatches(PyExc_AttributeError)) { @@ -873,7 +873,7 @@ builtin_map(PyObject *self, PyObject *args) } /* Update len. */ - curlen = PyObject_Size(curseq); + curlen = _PyObject_LengthCue(curseq); if (curlen < 0) { if (!PyErr_ExceptionMatches(PyExc_TypeError) && !PyErr_ExceptionMatches(PyExc_AttributeError)) { @@ -2108,7 +2108,7 @@ builtin_zip(PyObject *self, PyObject *args) len = -1; /* unknown */ for (i = 0; i < itemsize; ++i) { PyObject *item = PyTuple_GET_ITEM(args, i); - int thislen = PyObject_Size(item); + int thislen = _PyObject_LengthCue(item); if (thislen < 0) { if (!PyErr_ExceptionMatches(PyExc_TypeError) && !PyErr_ExceptionMatches(PyExc_AttributeError)) { |