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.
This commit is contained in:
Victor Stinner 2013-10-10 15:55:14 +02:00
parent 088cbf2d39
commit 7c74de4d00
1 changed files with 5 additions and 0 deletions

View File

@ -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);