Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 22b65a8

Browse files
committed
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.]
1 parent 93a8eac commit 22b65a8

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

Python/import.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1035,15 +1035,15 @@ allcaps8x3(s)
10351035
char *end = strchr(s, '\0');
10361036
if (dot != NULL) {
10371037
if (dot-s > 8)
1038-
return 1; /* More than 8 before '.' */
1038+
return 0; /* More than 8 before '.' */
10391039
if (end-dot > 4)
1040-
return 1; /* More than 3 after '.' */
1040+
return 0; /* More than 3 after '.' */
10411041
end = strchr(dot+1, '.');
10421042
if (end != NULL)
1043-
return 1; /* More than one dot */
1043+
return 0; /* More than one dot */
10441044
}
10451045
else if (end-s > 8)
1046-
return 1; /* More than 8 and no dot */
1046+
return 0; /* More than 8 and no dot */
10471047
while ((c = *s++)) {
10481048
if (islower(c))
10491049
return 0;

0 commit comments

Comments
 (0)