[Python-checkins] CVS: python/dist/src/Python getargs.c,2.56,2.57

Jeremy Hylton jhylton@users.sourceforge.net
Fri, 18 May 2001 13:57:40 -0700


Update of /cvsroot/python/python/dist/src/Python
In directory usw-pr-cvs1:/tmp/cvs-serv7254

Modified Files:
	getargs.c 
Log Message:
vgetargs1() and vgetargskeywords(): Replace uses of PyTuple_Size() and
    PyTuple_GetItem() with PyTuple_GET_SIZE() and PyTuple_GET_ITEM().
    The code has already done a PyTuple_Check().


Index: getargs.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/getargs.c,v
retrieving revision 2.56
retrieving revision 2.57
diff -C2 -r2.56 -r2.57
*** getargs.c	2001/05/13 08:04:26	2.56
--- getargs.c	2001/05/18 20:57:38	2.57
***************
*** 113,117 ****
  		else if (level != 0)
  			; /* Pass */
! 		else if (c == 'e')
  			; /* Pass */
  		else if (isalpha(c))
--- 113,117 ----
  		else if (level != 0)
  			; /* Pass */
!                 else if (c == 'e')
  			; /* Pass */
  		else if (isalpha(c))
***************
*** 167,171 ****
  	}
  	
! 	len = PyTuple_Size(args);
  	
  	if (len < min || max < len) {
--- 167,171 ----
  	}
  	
! 	len = PyTuple_GET_SIZE(args);
  	
  	if (len < min || max < len) {
***************
*** 189,194 ****
  		if (*format == '|')
  			format++;
! 		msg = convertitem(PyTuple_GetItem(args, i), &format, p_va,
! 				 levels, msgbuf);
  		if (msg) {
  			seterror(i+1, msg, levels, fname, message);
--- 189,194 ----
  		if (*format == '|')
  			format++;
! 		msg = convertitem(PyTuple_GET_ITEM(args, i), &format, p_va,
! 				  levels, msgbuf);
  		if (msg) {
  			seterror(i+1, msg, levels, fname, message);
***************
*** 1012,1021 ****
  			fname = format;
  			break;
! 		}
! 		else if (c == ';') {
  			message = format;
  			break;
! 		}
! 		else if (c == 'e')
  			; /* Pass */
  		else if (isalpha(c))
--- 1012,1019 ----
  			fname = format;
  			break;
! 		} else if (c == ';') {
  			message = format;
  			break;
! 		} else if (c == 'e')
  			; /* Pass */
  		else if (isalpha(c))
***************
*** 1036,1040 ****
  	}	
  	
! 	tplen = PyTuple_Size(args);
  	
  	/* do a cursory check of the keywords just to see how many we got */
--- 1034,1038 ----
  	}	
  	
! 	tplen = PyTuple_GET_SIZE(args);
  	
  	/* do a cursory check of the keywords just to see how many we got */
***************
*** 1112,1116 ****
  		if (*format == '|')
  			format++;
! 		msg = convertitem(PyTuple_GetItem(args, i), &format, p_va,
  				 levels, msgbuf);
  		if (msg) {
--- 1110,1114 ----
  		if (*format == '|')
  			format++;
! 		msg = convertitem(PyTuple_GET_ITEM(args, i), &format, p_va,
  				 levels, msgbuf);
  		if (msg) {