diff Objects/codeobject.c @ 86196:bea4447c22bf

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.
author Victor Stinner <victor.stinner@gmail.com>
date Thu, 10 Oct 2013 15:55:14 +0200
parents 5093cfdff2a9
children
line wrap: on
line diff
--- a/Objects/codeobject.c	Thu Oct 10 00:46:57 2013 -0700
+++ b/Objects/codeobject.c	Thu Oct 10 15:55:14 2013 +0200
@@ -74,6 +74,11 @@
         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);