summaryrefslogtreecommitdiff
path: root/Python/import.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/import.c')
-rw-r--r--Python/import.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/Python/import.c b/Python/import.c
index a096519f0b..289a1fbe05 100644
--- a/Python/import.c
+++ b/Python/import.c
@@ -76,9 +76,10 @@ extern time_t PyOS_GetLastModificationTime(char *, FILE *);
3060 (PEP 3115 metaclass syntax)
3070 (PEP 3109 raise changes)
3080 (PEP 3137 make __file__ and __name__ unicode)
+ 3090 (kill str8 interning)
.
*/
-#define MAGIC (3080 | ((long)'\r'<<16) | ((long)'\n'<<24))
+#define MAGIC (3090 | ((long)'\r'<<16) | ((long)'\n'<<24))
/* Magic word as global; note that _PyImport_Init() can change the
value of this global to accommodate for alterations of how the
@@ -2212,14 +2213,14 @@ ensure_fromlist(PyObject *mod, PyObject *fromlist, char *buf, Py_ssize_t buflen,
PyUnicode_GetSize(item),
NULL);
} else {
- item8 = PyUnicode_AsEncodedString(item,
- Py_FileSystemDefaultEncoding, NULL);
+ item8 = PyUnicode_AsEncodedString(item,
+ Py_FileSystemDefaultEncoding, NULL);
}
if (!item8) {
PyErr_SetString(PyExc_ValueError, "Cannot encode path item");
return 0;
}
- subname = PyBytes_AsString(item8);
+ subname = PyString_AS_STRING(item8);
if (buflen + strlen(subname) >= MAXPATHLEN) {
PyErr_SetString(PyExc_ValueError,
"Module name too long");