[Python-checkins] CVS: python/dist/src/Python bltinmodule.c,2.169,2.170 exceptions.c,1.8,1.9 getargs.c,2.39,2.40

Jeremy Hylton python-dev@python.org
Wed, 12 Jul 2000 06:03:05 -0700


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

Modified Files:
	bltinmodule.c exceptions.c getargs.c 
Log Message:
replace PyXXX_Length calls with PyXXX_Size calls


Index: bltinmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/bltinmodule.c,v
retrieving revision 2.169
retrieving revision 2.170
diff -C2 -r2.169 -r2.170
*** bltinmodule.c	2000/07/09 03:09:56	2.169
--- bltinmodule.c	2000/07/12 13:03:02	2.170
***************
*** 1386,1390 ****
  	if (!PyArg_ParseTuple(args, "O:len", &v))
  		return NULL;
! 	res = PyObject_Length(v);
  	if (res < 0 && PyErr_Occurred())
  		return NULL;
--- 1386,1390 ----
  	if (!PyArg_ParseTuple(args, "O:len", &v))
  		return NULL;
! 	res = PyObject_Size(v);
  	if (res < 0 && PyErr_Occurred())
  		return NULL;

Index: exceptions.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/exceptions.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** exceptions.c	2000/07/12 04:02:10	1.8
--- exceptions.c	2000/07/12 13:03:03	1.9
***************
*** 225,229 ****
  
      /* set args attribute */
!     args = PySequence_GetSlice(args, 1, PySequence_Length(args));
      if (!args)
          return NULL;
--- 225,230 ----
  
      /* set args attribute */
!     /* XXX size is only a hint */
!     args = PySequence_GetSlice(args, 1, PySequence_Size(args));
      if (!args)
          return NULL;
***************
*** 250,254 ****
          return NULL;
  
!     switch (PySequence_Length(args)) {
      case 0:
          out = PyString_FromString("");
--- 251,255 ----
          return NULL;
  
!     switch (PySequence_Size(args)) {
      case 0:
          out = PyString_FromString("");
***************
*** 375,379 ****
  
      /* Set args attribute. */
!     if (!(args = PySequence_GetSlice(args, 1, PySequence_Length(args))))
          return NULL;
      
--- 376,380 ----
  
      /* Set args attribute. */
!     if (!(args = PySequence_GetSlice(args, 1, PySequence_Size(args))))
          return NULL;
      
***************
*** 385,389 ****
  
      /* set code attribute */
!     switch (PySequence_Length(args)) {
      case 0:
          Py_INCREF(Py_None);
--- 386,390 ----
  
      /* set code attribute */
!     switch (PySequence_Size(args)) {
      case 0:
          Py_INCREF(Py_None);
***************
*** 442,446 ****
  	return NULL;
  
!     if (!(args = PySequence_GetSlice(args, 1, PySequence_Length(args))))
  	return NULL;
  
--- 443,447 ----
  	return NULL;
  
!     if (!(args = PySequence_GetSlice(args, 1, PySequence_Size(args))))
  	return NULL;
  
***************
*** 453,457 ****
      }
  
!     switch (PySequence_Length(args)) {
      case 3:
  	/* Where a function has a single filename, such as open() or some
--- 454,458 ----
      }
  
!     switch (PySequence_Size(args)) {
      case 3:
  	/* Where a function has a single filename, such as open() or some
***************
*** 672,676 ****
  	return NULL;
  
!     if (!(args = PySequence_GetSlice(args, 1, PySequence_Length(args))))
  	return NULL;
  
--- 673,677 ----
  	return NULL;
  
!     if (!(args = PySequence_GetSlice(args, 1, PySequence_Size(args))))
  	return NULL;
  
***************
*** 678,682 ****
  	goto finally;
  
!     lenargs = PySequence_Length(args);
      if (lenargs >= 1) {
  	PyObject* item0 = PySequence_GetItem(args, 0);
--- 679,683 ----
  	goto finally;
  
!     lenargs = PySequence_Size(args);
      if (lenargs >= 1) {
  	PyObject* item0 = PySequence_GetItem(args, 0);

Index: getargs.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/getargs.c,v
retrieving revision 2.39
retrieving revision 2.40
diff -C2 -r2.39 -r2.40
*** getargs.c	2000/07/09 03:09:56	2.39
--- getargs.c	2000/07/12 13:03:03	2.40
***************
*** 349,353 ****
  	}
  	
! 	if ((i = PySequence_Length(arg)) != n) {
  		levels[0] = 0;
  		sprintf(msgbuf,
--- 349,353 ----
  	}
  	
! 	if ((i = PySequence_Size(arg)) != n) {
  		levels[0] = 0;
  		sprintf(msgbuf,