]> granicus.if.org Git - python/commitdiff
Issue #3080: imp.new_module() uses Unicode
authorVictor Stinner <victor.stinner@haypocalc.com>
Mon, 14 Mar 2011 18:53:28 +0000 (14:53 -0400)
committerVictor Stinner <victor.stinner@haypocalc.com>
Mon, 14 Mar 2011 18:53:28 +0000 (14:53 -0400)
Python/import.c

index 5dcbf177109dc942969d2065752b8e1ff3996d80..3237ddc84ea039931535c6474d086580c4e4aec2 100644 (file)
@@ -3787,10 +3787,10 @@ imp_load_package(PyObject *self, PyObject *args)
 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 *