diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2011-03-20 03:28:55 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2011-03-20 03:28:55 (GMT) |
commit | 1304f2d8a348741c32bbf6970a3381df0fa7fdd1 (patch) | |
tree | 504d797f12f313159b97a52db5b1c339213dcdce | |
parent | 22a8cbe8af8a50aa9c60e50af0ea2e0fe934be06 (diff) | |
download | cpython-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.c | 4 |
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; |