Get rid of more uses of string and use unicode

This commit is contained in:
Neal Norwitz 2007-10-27 04:00:45 +00:00
parent 841e122f0e
commit bed678449f
7 changed files with 18 additions and 21 deletions

View file

@ -179,10 +179,7 @@ normalizeUserObj(PyObject *obj)
/* built-in function: look up the module name */
PyObject *mod = fn->m_module;
const char *modname;
if (mod && PyString_Check(mod)) {
modname = PyString_AS_STRING(mod);
}
else if (mod && PyUnicode_Check(mod)) {
if (mod && PyUnicode_Check(mod)) {
modname = PyUnicode_AsString(mod);
}
else if (mod && PyModule_Check(mod)) {