mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Get rid of more uses of string and use unicode
This commit is contained in:
parent
841e122f0e
commit
bed678449f
7 changed files with 18 additions and 21 deletions
|
@ -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)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue