summaryrefslogtreecommitdiffstats
path: root/Modules/mmapmodule.c
diff options
context:
space:
mode:
authorAndrew M. Kuchling <amk@amk.ca>2000-06-03 20:43:43 (GMT)
committerAndrew M. Kuchling <amk@amk.ca>2000-06-03 20:43:43 (GMT)
commit841b9fbebba244912421326fb4b0192c935f6cfb (patch)
tree1d43f26cd28ec3780e55c924ed210964a7798bcc /Modules/mmapmodule.c
parent961fe17b4cd3275a63e05b9c8c4c8e2eca16de9c (diff)
downloadcpython-841b9fbebba244912421326fb4b0192c935f6cfb.zip
cpython-841b9fbebba244912421326fb4b0192c935f6cfb.tar.gz
cpython-841b9fbebba244912421326fb4b0192c935f6cfb.tar.bz2
Use PyArg_ParseTuple and specify the method names, following a suggestion
from Greg Stein
Diffstat (limited to 'Modules/mmapmodule.c')
-rw-r--r--Modules/mmapmodule.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/Modules/mmapmodule.c b/Modules/mmapmodule.c
index 377002a..1f5e19a 100644
--- a/Modules/mmapmodule.c
+++ b/Modules/mmapmodule.c
@@ -75,7 +75,7 @@ mmap_object_dealloc(mmap_object * m_obj)
static PyObject *
mmap_close_method (mmap_object * self, PyObject * args)
{
- if (!PyArg_NoArgs(args))
+ if (!PyArg_ParseTuple(args, ":close"))
return NULL;
#ifdef MS_WIN32
UnmapViewOfFile (self->data);
@@ -120,7 +120,7 @@ mmap_read_byte_method (mmap_object * self,
char value;
char * where;
CHECK_VALID(NULL);
- if (!PyArg_NoArgs(args))
+ if (!PyArg_ParseTuple(args, ":read_byte"))
return NULL;
if (self->pos >= 0 && self->pos < self->size) {
where = self->data + self->pos;
@@ -143,7 +143,7 @@ mmap_read_line_method (mmap_object * self,
PyObject * result;
CHECK_VALID(NULL);
- if (!PyArg_NoArgs(args))
+ if (!PyArg_ParseTuple(args, ":readline"))
return NULL;
eol = memchr(start, '\n', self->size - self->pos);
@@ -250,7 +250,7 @@ mmap_size_method (mmap_object * self,
PyObject * args)
{
CHECK_VALID(NULL);
- if (!PyArg_NoArgs(args))
+ if (!PyArg_ParseTuple(args, ":size"))
return NULL;
#ifdef MS_WIN32
@@ -354,7 +354,7 @@ static PyObject *
mmap_tell_method (mmap_object * self, PyObject * args)
{
CHECK_VALID(NULL);
- if (!PyArg_NoArgs(args))
+ if (!PyArg_ParseTuple(args, ":tell"))
return NULL;
return (Py_BuildValue ("l", self->pos) );
}