[Python-checkins] CVS: python/dist/src/Python import.c,2.131,2.132

Guido van Rossum python-dev@python.org
Mon, 1 May 2000 13:37:00 -0400 (EDT)


Update of /projects/cvsroot/python/dist/src/Python
In directory eric:/projects/python/develop/guido/src/Python

Modified Files:
	import.c 
Log Message:
Robin Becker: The following patch seems to fix a module case bug in
1.6a2 caused by wrong return values in routine allcaps83.  [GvR: I
also changed the case for end-s>8 to return 0.]


Index: import.c
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Python/import.c,v
retrieving revision 2.131
retrieving revision 2.132
diff -C2 -r2.131 -r2.132
*** import.c	2000/04/28 19:03:54	2.131
--- import.c	2000/05/01 17:36:58	2.132
***************
*** 1036,1048 ****
  	if (dot != NULL) {
  		if (dot-s > 8)
! 			return 1; /* More than 8 before '.' */
  		if (end-dot > 4)
! 			return 1; /* More than 3 after '.' */
  		end = strchr(dot+1, '.');
  		if (end != NULL)
! 			return 1; /* More than one dot  */
  	}
  	else if (end-s > 8)
! 		return 1; /* More than 8 and no dot */
  	while ((c = *s++)) {
  		if (islower(c))
--- 1036,1048 ----
  	if (dot != NULL) {
  		if (dot-s > 8)
! 			return 0; /* More than 8 before '.' */
  		if (end-dot > 4)
! 			return 0; /* More than 3 after '.' */
  		end = strchr(dot+1, '.');
  		if (end != NULL)
! 			return 0; /* More than one dot  */
  	}
  	else if (end-s > 8)
! 		return 0; /* More than 8 and no dot */
  	while ((c = *s++)) {
  		if (islower(c))