mirror of
https://github.com/python/cpython.git
synced 2025-10-10 00:43:41 +00:00
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
1 changed files with 5 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue