[Python-checkins] CVS: python/dist/src/Python getargs.c,2.54,2.54.4.1

Thomas Wouters twouters@users.sourceforge.net
Wed, 27 Jun 2001 06:11:11 -0700


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

Modified Files:
      Tag: release21-maint
	getargs.c 
Log Message:

Backport Jeremy's checkin 2.57:

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.54
retrieving revision 2.54.4.1
diff -C2 -r2.54 -r2.54.4.1
*** getargs.c	2001/02/12 22:13:26	2.54
--- getargs.c	2001/06/27 13:11:09	2.54.4.1
***************
*** 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);
***************
*** 996,1005 ****
  			fname = format;
  			break;
! 		}
! 		else if (c == ';') {
  			message = format;
  			break;
! 		}
! 		else if (c == 'e')
  			; /* Pass */
  		else if (isalpha(c))
--- 996,1003 ----
  			fname = format;
  			break;
! 		} else if (c == ';') {
  			message = format;
  			break;
! 		} else if (c == 'e')
  			; /* Pass */
  		else if (isalpha(c))
***************
*** 1020,1024 ****
  	}	
  	
! 	tplen = PyTuple_Size(args);
  	
  	/* do a cursory check of the keywords just to see how many we got */
--- 1018,1022 ----
  	}	
  	
! 	tplen = PyTuple_GET_SIZE(args);
  	
  	/* do a cursory check of the keywords just to see how many we got */
***************
*** 1096,1100 ****
  		if (*format == '|')
  			format++;
! 		msg = convertitem(PyTuple_GetItem(args, i), &format, p_va,
  				 levels, msgbuf);
  		if (msg) {
--- 1094,1098 ----
  		if (*format == '|')
  			format++;
! 		msg = convertitem(PyTuple_GET_ITEM(args, i), &format, p_va,
  				 levels, msgbuf);
  		if (msg) {