Kaydet (Commit) fe19d218 authored tarafından Victor Stinner's avatar Victor Stinner

Issue #3080: imp.new_module() uses Unicode

üst 2fd76e47
...@@ -3787,10 +3787,10 @@ imp_load_package(PyObject *self, PyObject *args) ...@@ -3787,10 +3787,10 @@ imp_load_package(PyObject *self, PyObject *args)
static PyObject * static PyObject *
imp_new_module(PyObject *self, PyObject *args) imp_new_module(PyObject *self, PyObject *args)
{ {
char *name; PyObject *name;
if (!PyArg_ParseTuple(args, "s:new_module", &name)) if (!PyArg_ParseTuple(args, "U:new_module", &name))
return NULL; return NULL;
return PyModule_New(name); return PyModule_NewObject(name);
} }
static PyObject * static PyObject *
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment