[Python-checkins] CVS: python/dist/src/Modules mmapmodule.c,2.9,2.10

A.M. Kuchling python-dev@python.org
Sat, 3 Jun 2000 13:43:46 -0700


Update of /cvsroot/python/python/dist/src/Modules
In directory slayer.i.sourceforge.net:/tmp/cvs-serv2626

Modified Files:
	mmapmodule.c 
Log Message:
Use PyArg_ParseTuple and specify the method names, following a suggestion
   from Greg Stein


Index: mmapmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/mmapmodule.c,v
retrieving revision 2.9
retrieving revision 2.10
diff -C2 -r2.9 -r2.10
*** mmapmodule.c	2000/06/03 19:41:42	2.9
--- mmapmodule.c	2000/06/03 20:43:43	2.10
***************
*** 2,6 ****
   /  Author: Sam Rushing <rushing@nightmare.com>
   /  Hacked for Unix by A.M. Kuchling <amk1@bigfoot.com> 
!  /  $Id: mmapmodule.c,v 2.9 2000/06/03 19:41:42 akuchling Exp $
  
   / mmapmodule.cpp -- map a view of a file into memory
--- 2,6 ----
   /  Author: Sam Rushing <rushing@nightmare.com>
   /  Hacked for Unix by A.M. Kuchling <amk1@bigfoot.com> 
!  /  $Id: mmapmodule.c,v 2.10 2000/06/03 20:43:43 akuchling Exp $
  
   / mmapmodule.cpp -- map a view of a file into memory
***************
*** 76,80 ****
  mmap_close_method (mmap_object * self, PyObject * args)
  {
!         if (!PyArg_NoArgs(args))
  		return NULL;
  #ifdef MS_WIN32
--- 76,80 ----
  mmap_close_method (mmap_object * self, PyObject * args)
  {
!         if (!PyArg_ParseTuple(args, ":close"))
  		return NULL;
  #ifdef MS_WIN32
***************
*** 121,125 ****
  	char * where;
  	CHECK_VALID(NULL);
!         if (!PyArg_NoArgs(args))
  		return NULL;
  	if (self->pos >= 0 && self->pos < self->size) {
--- 121,125 ----
  	char * where;
  	CHECK_VALID(NULL);
!         if (!PyArg_ParseTuple(args, ":read_byte"))
  		return NULL;
  	if (self->pos >= 0 && self->pos < self->size) {
***************
*** 144,148 ****
  
  	CHECK_VALID(NULL);
!         if (!PyArg_NoArgs(args))
  		return NULL;
  
--- 144,148 ----
  
  	CHECK_VALID(NULL);
!         if (!PyArg_ParseTuple(args, ":readline"))
  		return NULL;
  
***************
*** 251,255 ****
  {
  	CHECK_VALID(NULL);
!         if (!PyArg_NoArgs(args))
  		return NULL;
  
--- 251,255 ----
  {
  	CHECK_VALID(NULL);
!         if (!PyArg_ParseTuple(args, ":size"))
  		return NULL;
  
***************
*** 355,359 ****
  {
  	CHECK_VALID(NULL);
!         if (!PyArg_NoArgs(args))
  		return NULL;
  	return (Py_BuildValue ("l", self->pos) );
--- 355,359 ----
  {
  	CHECK_VALID(NULL);
!         if (!PyArg_ParseTuple(args, ":tell"))
  		return NULL;
  	return (Py_BuildValue ("l", self->pos) );