summaryrefslogtreecommitdiffstats
path: root/Objects/abstract.c
diff options
context:
space:
mode:
authorArmin Rigo <arigo@tunes.org>2006-02-11 21:32:43 (GMT)
committerArmin Rigo <arigo@tunes.org>2006-02-11 21:32:43 (GMT)
commitf5b3e36493da275334e29afdbd238863697dca35 (patch)
tree9ddfdb941f79b23a7665f473df37f82f49a80981 /Objects/abstract.c
parentcbcdfdc1129cdec27281f62e4494a05405354340 (diff)
downloadcpython-f5b3e36493da275334e29afdbd238863697dca35.zip
cpython-f5b3e36493da275334e29afdbd238863697dca35.tar.gz
cpython-f5b3e36493da275334e29afdbd238863697dca35.tar.bz2
Renamed _length_cue() to __length_hint__(). See:
http://mail.python.org/pipermail/python-dev/2006-February/060524.html
Diffstat (limited to 'Objects/abstract.c')
-rw-r--r--Objects/abstract.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Objects/abstract.c b/Objects/abstract.c
index 8a5166e..b794974 100644
--- a/Objects/abstract.c
+++ b/Objects/abstract.c
@@ -82,7 +82,7 @@ PyObject_Length(PyObject *o)
#define PyObject_Length PyObject_Size
int
-_PyObject_LengthCue(PyObject *o)
+_PyObject_LengthHint(PyObject *o)
{
int rv = PyObject_Size(o);
if (rv != -1)
@@ -92,7 +92,7 @@ _PyObject_LengthCue(PyObject *o)
PyObject *err_type, *err_value, *err_tb, *ro;
PyErr_Fetch(&err_type, &err_value, &err_tb);
- ro = PyObject_CallMethod(o, "_length_cue", NULL);
+ ro = PyObject_CallMethod(o, "__length_hint__", NULL);
if (ro != NULL) {
rv = (int)PyInt_AsLong(ro);
Py_DECREF(ro);
@@ -1463,7 +1463,7 @@ PySequence_Tuple(PyObject *v)
return NULL;
/* Guess result size and allocate space. */
- n = _PyObject_LengthCue(v);
+ n = _PyObject_LengthHint(v);
if (n < 0) {
if (!PyErr_ExceptionMatches(PyExc_TypeError) &&
!PyErr_ExceptionMatches(PyExc_AttributeError)) {