Updated UCD version and unicode.org links to Unicode 6.0.0

This commit is contained in:
Alexander Belopolsky 2010-12-10 18:11:24 +00:00
parent 070ec70cbe
commit fc55789cae
3 changed files with 38 additions and 33 deletions

View file

@ -168,8 +168,8 @@ PyModule_GetDict(PyObject *m)
return d;
}
const char *
PyModule_GetName(PyObject *m)
PyObject *
PyModule_GetNameObject(PyObject *m)
{
PyObject *d;
PyObject *nameobj;
@ -185,7 +185,21 @@ PyModule_GetName(PyObject *m)
PyErr_SetString(PyExc_SystemError, "nameless module");
return NULL;
}
return _PyUnicode_AsString(nameobj);
Py_INCREF(nameobj);
return nameobj;
}
const char *
PyModule_GetName(PyObject *m)
{
PyObject *nameobj;
char *utf8;
nameobj = PyModule_GetNameObject(m);
if (nameobj == NULL)
return NULL;
utf8 = _PyUnicode_AsString(nameobj);
Py_DECREF(nameobj);
return utf8;
}
PyObject*