[Python-checkins] CVS: python/dist/src/Python errors.c,2.61,2.62

Martin v. L?wis loewis@users.sourceforge.net
Tue, 06 Mar 2001 04:12:04 -0800


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

Modified Files:
	errors.c 
Log Message:
Use Py_CHARMASK for ctype macros. Fixes bug #232787.


Index: errors.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/errors.c,v
retrieving revision 2.61
retrieving revision 2.62
diff -C2 -r2.61 -r2.62
*** errors.c	2001/02/28 21:46:24	2.61
--- errors.c	2001/03/06 12:12:02	2.62
***************
*** 403,407 ****
  		if (*f == '%') {
  			const char* p = f;
! 			while (*++f && *f != '%' && !isalpha(*f))
  				;
  			switch (*f) {
--- 403,407 ----
  		if (*f == '%') {
  			const char* p = f;
! 			while (*++f && *f != '%' && !isalpha(Py_CHARMASK(*f)))
  				;
  			switch (*f) {
***************
*** 458,470 ****
  			   interested in the precision value, if any) */
  			n = 0;
! 			while (isdigit(*f))
  				n = (n*10) + *f++ - '0';
  			if (*f == '.') {
  				f++;
  				n = 0;
! 				while (isdigit(*f))
  					n = (n*10) + *f++ - '0';
  			}
! 			while (*f && *f != '%' && !isalpha(*f))
  				f++;
  			switch (*f) {
--- 458,470 ----
  			   interested in the precision value, if any) */
  			n = 0;
! 			while (isdigit(Py_CHARMASK(*f)))
  				n = (n*10) + *f++ - '0';
  			if (*f == '.') {
  				f++;
  				n = 0;
! 				while (isdigit(Py_CHARMASK(*f)))
  					n = (n*10) + *f++ - '0';
  			}
! 			while (*f && *f != '%' && !isalpha(Py_CHARMASK(*f)))
  				f++;
  			switch (*f) {