Commits

Victor Stinner committed c17bc20

Issue #3080: imp.new_module() uses Unicode

  • Participants
  • Parent commits 9aec6f0

Comments (0)

Files changed (1)

 static PyObject *
 imp_new_module(PyObject *self, PyObject *args)
 {
-    char *name;
-    if (!PyArg_ParseTuple(args, "s:new_module", &name))
+    PyObject *name;
+    if (!PyArg_ParseTuple(args, "U:new_module", &name))
         return NULL;
-    return PyModule_New(name);
+    return PyModule_NewObject(name);
 }
 
 static PyObject *