projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
088cbf2
)
Issue #18874: PyCode_New() now ensures that the filename is a ready Unicode
author
Victor Stinner
<victor.stinner@gmail.com>
Thu, 10 Oct 2013 13:55:14 +0000
(15:55 +0200)
committer
Victor Stinner
<victor.stinner@gmail.com>
Thu, 10 Oct 2013 13:55:14 +0000
(15:55 +0200)
string. This change does nothing is most cases, but it is useful on Windows in
some cases.
Objects/codeobject.c
patch
|
blob
|
history
diff --git
a/Objects/codeobject.c
b/Objects/codeobject.c
index 9713f61b244a714c9ddf8fc8a5e830fd48c31537..353f414a38486b8ab319d8fdd07934ba5b4b54d5 100644
(file)
--- a/
Objects/codeobject.c
+++ b/
Objects/codeobject.c
@@
-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);