Commit 7c74de4d authored by Victor Stinner's avatar Victor Stinner

Issue #18874: PyCode_New() now ensures that the filename is a ready Unicode

string. This change does nothing is most cases, but it is useful on Windows in
some cases.
parent 088cbf2d
......@@ -74,6 +74,11 @@ PyCode_New(int argcount, int kwonlyargcount,
PyErr_BadInternalCall();
return NULL;
}
/* Ensure that the filename is a ready Unicode string */
if (PyUnicode_READY(filename) < 0)
return NULL;
n_cellvars = PyTuple_GET_SIZE(cellvars);
intern_strings(names);
intern_strings(varnames);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment