Mercurial > cpython-lru_cache-weakref
diff Python/import.c @ 12536:cc05edcccf52 legacy-trunk
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.]
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Mon, 01 May 2000 17:36:58 +0000 |
| parents | 84cd52b560e5 |
| children | c8dbd5f70288 |
line wrap: on
line diff
--- a/Python/import.c Mon May 01 16:18:22 2000 +0000 +++ b/Python/import.c Mon May 01 17:36:58 2000 +0000 @@ -1035,15 +1035,15 @@ char *end = strchr(s, '\0'); if (dot != NULL) { if (dot-s > 8) - return 1; /* More than 8 before '.' */ + return 0; /* More than 8 before '.' */ if (end-dot > 4) - return 1; /* More than 3 after '.' */ + return 0; /* More than 3 after '.' */ end = strchr(dot+1, '.'); if (end != NULL) - return 1; /* More than one dot */ + return 0; /* More than one dot */ } else if (end-s > 8) - return 1; /* More than 8 and no dot */ + return 0; /* More than 8 and no dot */ while ((c = *s++)) { if (islower(c)) return 0;
