[Python-checkins] r83303 - python/branches/import_unicode/Python/import.c
victor.stinner
python-checkins at python.org
Fri Jul 30 22:35:57 CEST 2010
Author: victor.stinner
Date: Fri Jul 30 22:35:57 2010
New Revision: 83303
Log:
fix filename match in get_sourcefile()
Modified:
python/branches/import_unicode/Python/import.c
Modified: python/branches/import_unicode/Python/import.c
==============================================================================
--- python/branches/import_unicode/Python/import.c (original)
+++ python/branches/import_unicode/Python/import.c Fri Jul 30 22:35:57 2010
@@ -1452,10 +1452,10 @@
file = PyUnicode_AS_UNICODE(fileobj);
/* match '*.py?' */
- if (4 <= len
- && file[len-3] == '.'
- && (file[len-2] == 'p' || file[len-2] == 'P')
- && (file[len-1] == 'y' || file[len-1] == 'Y')) {
+ if (5 <= len
+ && file[len-4] == '.'
+ && (file[len-3] == 'p' || file[len-3] == 'P')
+ && (file[len-2] == 'y' || file[len-2] == 'Y')) {
Py_INCREF(fileobj);
return fileobj;
}
More information about the Python-checkins
mailing list