summaryrefslogtreecommitdiffstats
path: root/Objects/fileobject.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2000-02-29 13:59:29 (GMT)
committerGuido van Rossum <guido@python.org>2000-02-29 13:59:29 (GMT)
commit43713e5a2899930a8698e244b0d0fef59a676d17 (patch)
tree3d9740aff47f70cea403a2c924a37b468d1eded6 /Objects/fileobject.c
parenta9b2b4be26df7c3da8a20d1a5f4d2b796e455b4b (diff)
downloadcpython-43713e5a2899930a8698e244b0d0fef59a676d17.zip
cpython-43713e5a2899930a8698e244b0d0fef59a676d17.tar.gz
cpython-43713e5a2899930a8698e244b0d0fef59a676d17.tar.bz2
Massive patch by Skip Montanaro to add ":name" to as many
PyArg_ParseTuple() format string arguments as possible.
Diffstat (limited to 'Objects/fileobject.c')
-rw-r--r--Objects/fileobject.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/Objects/fileobject.c b/Objects/fileobject.c
index 867b11a..5b3d6eb 100644
--- a/Objects/fileobject.c
+++ b/Objects/fileobject.c
@@ -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;