summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-03-20 03:28:55 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-03-20 03:28:55 (GMT)
commit1304f2d8a348741c32bbf6970a3381df0fa7fdd1 (patch)
tree504d797f12f313159b97a52db5b1c339213dcdce
parent22a8cbe8af8a50aa9c60e50af0ea2e0fe934be06 (diff)
downloadcpython-1304f2d8a348741c32bbf6970a3381df0fa7fdd1.zip
cpython-1304f2d8a348741c32bbf6970a3381df0fa7fdd1.tar.gz
cpython-1304f2d8a348741c32bbf6970a3381df0fa7fdd1.tar.bz2
Issue #3080: Fix case_ok() using case_bytes()
Invert name and namelen arguments.
-rw-r--r--Python/import.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/import.c b/Python/import.c
index 7f9042a..0194d89 100644
--- a/Python/import.c
+++ b/Python/import.c
@@ -2208,8 +2208,8 @@ case_ok(PyObject *filename, Py_ssize_t prefix_delta, PyObject *name)
match = case_bytes(
PyBytes_AS_STRING(filebytes),
PyBytes_GET_SIZE(filebytes) + prefix_delta,
- PyBytes_AS_STRING(namebytes),
- PyBytes_GET_SIZE(namebytes));
+ PyBytes_GET_SIZE(namebytes),
+ PyBytes_AS_STRING(namebytes));
Py_DECREF(filebytes);
Py_DECREF(namebytes);
return match;