[Python-checkins] python/dist/src/Python getargs.c,2.101,2.102

mwh at users.sourceforge.net mwh at users.sourceforge.net
Sat Aug 7 19:57:19 CEST 2004


Update of /cvsroot/python/python/dist/src/Python
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29636

Modified Files:
	getargs.c 
Log Message:
Fix

[ 991812 ] PyArg_ParseTuple can miss errors with warnings as exceptions 

as suggested in the report.

This is definitely a 2.3 candidate (as are most of the checkins I've
made in the last month...)


Index: getargs.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/getargs.c,v
retrieving revision 2.101
retrieving revision 2.102
diff -C2 -d -r2.101 -r2.102
*** getargs.c	10 Jul 2004 22:20:16 -0000	2.101
--- getargs.c	7 Aug 2004 17:57:16 -0000	2.102
***************
*** 473,477 ****
  		long ival;
  		if (float_argument_error(arg))
! 			return NULL;
  		ival = PyInt_AsLong(arg);
  		if (ival == -1 && PyErr_Occurred())
--- 473,477 ----
  		long ival;
  		if (float_argument_error(arg))
! 			return converterr("integer<b>", arg, msgbuf, bufsize);
  		ival = PyInt_AsLong(arg);
  		if (ival == -1 && PyErr_Occurred())
***************
*** 497,501 ****
  		long ival;
  		if (float_argument_error(arg))
! 			return NULL;
  		ival = PyInt_AsUnsignedLongMask(arg);
  		if (ival == -1 && PyErr_Occurred())
--- 497,501 ----
  		long ival;
  		if (float_argument_error(arg))
! 			return converterr("integer<B>", arg, msgbuf, bufsize);
  		ival = PyInt_AsUnsignedLongMask(arg);
  		if (ival == -1 && PyErr_Occurred())
***************
*** 510,514 ****
  		long ival;
  		if (float_argument_error(arg))
! 			return NULL;
  		ival = PyInt_AsLong(arg);
  		if (ival == -1 && PyErr_Occurred())
--- 510,514 ----
  		long ival;
  		if (float_argument_error(arg))
! 			return converterr("integer<h>", arg, msgbuf, bufsize);
  		ival = PyInt_AsLong(arg);
  		if (ival == -1 && PyErr_Occurred())
***************
*** 534,538 ****
  		long ival;
  		if (float_argument_error(arg))
! 			return NULL;
  		ival = PyInt_AsUnsignedLongMask(arg);
  		if (ival == -1 && PyErr_Occurred())
--- 534,538 ----
  		long ival;
  		if (float_argument_error(arg))
! 			return converterr("integer<H>", arg, msgbuf, bufsize);
  		ival = PyInt_AsUnsignedLongMask(arg);
  		if (ival == -1 && PyErr_Occurred())
***************
*** 547,551 ****
  		long ival;
  		if (float_argument_error(arg))
! 			return NULL;
  		ival = PyInt_AsLong(arg);
  		if (ival == -1 && PyErr_Occurred())
--- 547,551 ----
  		long ival;
  		if (float_argument_error(arg))
! 			return converterr("integer<i>", arg, msgbuf, bufsize);
  		ival = PyInt_AsLong(arg);
  		if (ival == -1 && PyErr_Occurred())
***************
*** 571,575 ****
  		unsigned int ival;
  		if (float_argument_error(arg))
! 			return NULL;
  		ival = PyInt_AsUnsignedLongMask(arg);
  		if (ival == -1 && PyErr_Occurred())
--- 571,575 ----
  		unsigned int ival;
  		if (float_argument_error(arg))
! 			return converterr("integer<I>", arg, msgbuf, bufsize);
  		ival = PyInt_AsUnsignedLongMask(arg);
  		if (ival == -1 && PyErr_Occurred())
***************
*** 584,588 ****
  		long ival;
  		if (float_argument_error(arg))
! 			return NULL;
  		ival = PyInt_AsLong(arg);
  		if (ival == -1 && PyErr_Occurred())
--- 584,588 ----
  		long ival;
  		if (float_argument_error(arg))
! 			return converterr("integer<l>", arg, msgbuf, bufsize);
  		ival = PyInt_AsLong(arg);
  		if (ival == -1 && PyErr_Occurred())
***************
*** 621,626 ****
  		unsigned PY_LONG_LONG *p = va_arg(*p_va, unsigned PY_LONG_LONG *);
  		unsigned PY_LONG_LONG ival;
- 		if (float_argument_error(arg))
- 			return NULL;
  		if (PyInt_Check(arg))
  			ival = PyInt_AsUnsignedLongMask(arg);
--- 621,624 ----



More information about the Python-checkins mailing list