mirror of https://github.com/python/cpython
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:
parent
088cbf2d39
commit
7c74de4d00
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue