Massive patch by Skip Montanaro to add ":name" to as many

PyArg_ParseTuple() format string arguments as possible.
This commit is contained in:
Guido van Rossum 2000-02-29 13:59:29 +00:00
parent a9b2b4be26
commit 43713e5a28
37 changed files with 272 additions and 272 deletions

View file

@ -263,7 +263,7 @@ file_seek(f, args)
if (f->f_fp == NULL)
return err_closed();
whence = 0;
if (!PyArg_ParseTuple(args, "O|i", &offobj, &whence))
if (!PyArg_ParseTuple(args, "O|i:seek", &offobj, &whence))
return NULL;
#if !defined(HAVE_LARGEFILE_SUPPORT)
offset = PyInt_AsLong(offobj);
@ -305,7 +305,7 @@ file_truncate(f, args)
if (f->f_fp == NULL)
return err_closed();
newsizeobj = NULL;
if (!PyArg_ParseTuple(args, "|O", &newsizeobj))
if (!PyArg_ParseTuple(args, "|O:truncate", &newsizeobj))
return NULL;
if (newsizeobj != NULL) {
#if !defined(HAVE_LARGEFILE_SUPPORT)
@ -518,7 +518,7 @@ file_read(f, args)
if (f->f_fp == NULL)
return err_closed();
if (!PyArg_ParseTuple(args, "|l", &bytesrequested))
if (!PyArg_ParseTuple(args, "|l:read", &bytesrequested))
return NULL;
if (bytesrequested < 0)
buffersize = new_buffersize(f, (size_t)0);
@ -732,7 +732,7 @@ file_readline(f, args)
if (f->f_fp == NULL)
return err_closed();
if (!PyArg_ParseTuple(args, "|i", &n))
if (!PyArg_ParseTuple(args, "|i:readline", &n))
return NULL;
if (n == 0)
return PyString_FromString("");
@ -761,7 +761,7 @@ file_readlines(f, args)
if (f->f_fp == NULL)
return err_closed();
if (!PyArg_ParseTuple(args, "|l", &sizehint))
if (!PyArg_ParseTuple(args, "|l:readlines", &sizehint))
return NULL;
if ((list = PyList_New(0)) == NULL)
return NULL;