Mercurial > cpython-lru_cache-weakref
diff Python/exceptions.c @ 13576:61e4c29d53d8 legacy-trunk
replace PyXXX_Length calls with PyXXX_Size calls
| author | Jeremy Hylton <jeremy@alum.mit.edu> |
|---|---|
| date | Wed, 12 Jul 2000 13:05:33 +0000 |
| parents | e558eb228a46 |
| children | 5b727ab37092 |
line wrap: on
line diff
--- a/Python/exceptions.c Wed Jul 12 12:56:19 2000 +0000 +++ b/Python/exceptions.c Wed Jul 12 13:05:33 2000 +0000 @@ -224,7 +224,8 @@ return NULL; /* set args attribute */ - args = PySequence_GetSlice(args, 1, PySequence_Length(args)); + /* XXX size is only a hint */ + args = PySequence_GetSlice(args, 1, PySequence_Size(args)); if (!args) return NULL; status = PyObject_SetAttrString(self, "args", args); @@ -249,7 +250,7 @@ if (!args) return NULL; - switch (PySequence_Length(args)) { + switch (PySequence_Size(args)) { case 0: out = PyString_FromString(""); break; @@ -374,7 +375,7 @@ return NULL; /* Set args attribute. */ - if (!(args = PySequence_GetSlice(args, 1, PySequence_Length(args)))) + if (!(args = PySequence_GetSlice(args, 1, PySequence_Size(args)))) return NULL; status = PyObject_SetAttrString(self, "args", args); @@ -384,7 +385,7 @@ } /* set code attribute */ - switch (PySequence_Length(args)) { + switch (PySequence_Size(args)) { case 0: Py_INCREF(Py_None); code = Py_None; @@ -441,7 +442,7 @@ if (!(self = get_self(args))) return NULL; - if (!(args = PySequence_GetSlice(args, 1, PySequence_Length(args)))) + if (!(args = PySequence_GetSlice(args, 1, PySequence_Size(args)))) return NULL; if (PyObject_SetAttrString(self, "args", args) || @@ -452,7 +453,7 @@ goto finally; } - switch (PySequence_Length(args)) { + switch (PySequence_Size(args)) { case 3: /* Where a function has a single filename, such as open() or some * of the os module functions, PyErr_SetFromErrnoWithFilename() is @@ -671,13 +672,13 @@ if (!(self = get_self(args))) return NULL; - if (!(args = PySequence_GetSlice(args, 1, PySequence_Length(args)))) + if (!(args = PySequence_GetSlice(args, 1, PySequence_Size(args)))) return NULL; if (PyObject_SetAttrString(self, "args", args)) goto finally; - lenargs = PySequence_Length(args); + lenargs = PySequence_Size(args); if (lenargs >= 1) { PyObject* item0 = PySequence_GetItem(args, 0); int status;
