]> granicus.if.org Git - python/commitdiff
Fix a couple of warnings
authorNeal Norwitz <nnorwitz@gmail.com>
Sun, 26 Aug 2007 05:32:41 +0000 (05:32 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Sun, 26 Aug 2007 05:32:41 +0000 (05:32 +0000)
Modules/cjkcodecs/cjkcodecs.h
Python/import.c

index 9449c1ff9a79d098ff48ae20d66da199dad9ce00..3ec24cb7eb76585594d88d10c1e1066eb84b4d74 100644 (file)
@@ -266,7 +266,7 @@ getcodec(PyObject *self, PyObject *encoding)
                                "encoding name must be a string.");
                return NULL;
        }
-       enc = PyUnicode_AsString(encoding, NULL);
+       enc = PyUnicode_AsString(encoding);
        if (enc == NULL)
                return NULL;
 
index 72138c2ea8bc6b8db29281fc2d7c12d4d95b80b5..24eeada69d94c688f817def3ec8e35cac0487240 100644 (file)
@@ -2366,7 +2366,7 @@ PyImport_ReloadModule(PyObject *m)
                                "reload() argument must be module");
                return NULL;
        }
-       name = PyModule_GetName(m);
+       name = (char*)PyModule_GetName(m);
        if (name == NULL)
                return NULL;
        if (m != PyDict_GetItemString(modules, name)) {