From: Victor Stinner Date: Sun, 20 Mar 2011 03:28:55 +0000 (+0100) Subject: Issue #3080: Fix case_ok() using case_bytes() X-Git-Tag: v3.3.0a1~2846 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1304f2d8a348741c32bbf6970a3381df0fa7fdd1;p=thirdparty%2FPython%2Fcpython.git Issue #3080: Fix case_ok() using case_bytes() Invert name and namelen arguments. --- diff --git a/Python/import.c b/Python/import.c index 7f9042ac0167..0194d89956d9 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;