]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #3080: Fix case_ok() using case_bytes()
authorVictor Stinner <victor.stinner@haypocalc.com>
Sun, 20 Mar 2011 03:28:55 +0000 (04:28 +0100)
committerVictor Stinner <victor.stinner@haypocalc.com>
Sun, 20 Mar 2011 03:28:55 +0000 (04:28 +0100)
Invert name and namelen arguments.

Python/import.c

index 7f9042ac016780a9d3c9c7976f59f990d2933692..0194d89956d99f62244a7a8e252653b5a2028d0a 100644 (file)
@@ -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;