diff options
Diffstat (limited to 'Python/import.c')
-rw-r--r-- | Python/import.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/import.c b/Python/import.c index be456f1..a096519 100644 --- a/Python/import.c +++ b/Python/import.c @@ -2384,7 +2384,7 @@ PyImport_ReloadModule(PyObject *m) subname = name; else { PyObject *parentname, *parent; - parentname = PyString_FromStringAndSize(name, (subname-name)); + parentname = PyUnicode_FromStringAndSize(name, (subname-name)); if (parentname == NULL) { imp_modules_reloading_clear(); return NULL; @@ -2393,7 +2393,7 @@ PyImport_ReloadModule(PyObject *m) if (parent == NULL) { PyErr_Format(PyExc_ImportError, "reload(): parent %.200s not in sys.modules", - PyString_AS_STRING(parentname)); + PyUnicode_AsString(parentname)); Py_DECREF(parentname); imp_modules_reloading_clear(); return NULL; |